Module: Canis::ConfigSetup
- Included in:
- ListCellRenderer, TreeCellRenderer, Widget
- Defined in:
- lib/canis/core/widgets/rwidget.rb
Overview
module eventh }}}
Instance Method Summary collapse
- #config_setup(aconfig) ⇒ Object
-
#variable_set(var, val) ⇒ Object
private options passed in the constructor call the relevant methods declared in dsl_accessor or dsl_property.
Instance Method Details
#config_setup(aconfig) ⇒ Object
1062 1063 1064 1065 1066 1067 1068 1069 1070 |
# File 'lib/canis/core/widgets/rwidget.rb', line 1062 def config_setup aconfig @config = aconfig # this creates a problem in 1.9.2 since variable_set sets @config 2010-08-22 19:05 RK #@config.each_pair { |k,v| variable_set(k,v) } keys = @config.keys keys.each do |e| variable_set(e, @config[e]) end end |
#variable_set(var, val) ⇒ Object
private options passed in the constructor call the relevant methods declared in dsl_accessor or dsl_property
1059 1060 1061 |
# File 'lib/canis/core/widgets/rwidget.rb', line 1059 def variable_set var, val send("#{var}", val) #rescue send("#{var}=", val) end |