Class: Qt::Variant

Inherits:
Object show all
Defined in:
lib/ruber/qt_sugar.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) to_bool

Redefinition of to_bool it’s needed because otherwise the Object#to_bool method defined in facets/boolean is used, instead of calling method_missing.

By explicitly define a to_bool and having it call method_missing, the problem is solved



585
586
587
# File 'lib/ruber/qt_sugar.rb', line 585

def to_bool
  method_missing :to_bool
end

- (Object) to_sym



574
575
576
# File 'lib/ruber/qt_sugar.rb', line 574

def to_sym
  to_string.to_sym
end