Method: TkVariable#coerce
- Defined in:
- lib/tk/variable.rb
#coerce(other) ⇒ Object
1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 |
# File 'lib/tk/variable.rb', line 1157 def coerce(other) case other when TkVariable [other._value, self._value] when String [other, self.to_s] when Symbol [other, self.to_sym] when Numeric [other, self.numeric] when Array [other, self.to_a] else [other, self._value] end end |