Class: Qt::Variant

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

Instance Method Summary collapse

Instance Method Details

#to_boolObject

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</method> and having it call <tt>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

#to_symObject



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

def to_sym
  to_string.to_sym
end