Module: TkComponent::Builder::ValueTyping
- Included in:
- TkItemWithVariable, TkText
- Defined in:
- lib/tk_component/builder/tk_item.rb
Instance Method Summary collapse
- #apply_option(option, v, to_item = self.native_item) ⇒ Object
- #f_value ⇒ Object
- #i_value ⇒ Object
- #s_value ⇒ Object
- #update_value(v) ⇒ Object
Instance Method Details
#apply_option(option, v, to_item = self.native_item) ⇒ Object
77 78 79 80 81 82 83 84 |
# File 'lib/tk_component/builder/tk_item.rb', line 77 def apply_option(option, v, to_item = self.native_item) case option.to_sym when :value self.value = v else super end end |
#f_value ⇒ Object
94 95 96 |
# File 'lib/tk_component/builder/tk_item.rb', line 94 def f_value value.to_f end |
#i_value ⇒ Object
90 91 92 |
# File 'lib/tk_component/builder/tk_item.rb', line 90 def i_value value.to_i end |
#s_value ⇒ Object
98 99 100 |
# File 'lib/tk_component/builder/tk_item.rb', line 98 def s_value value.to_s end |
#update_value(v) ⇒ Object
86 87 88 |
# File 'lib/tk_component/builder/tk_item.rb', line 86 def update_value(v) self.value = v if value.to_s != v.to_s end |