Method: TkVariable#set_bool
- Defined in:
- lib/tk/variable.rb
#set_bool(val) ⇒ Object Also known as: bool=
790 791 792 793 794 795 796 797 798 799 800 801 802 |
# File 'lib/tk/variable.rb', line 790 def set_bool(val) if ! val self.value = '0' else case val.to_s.downcase when 'false', '0', 'no', 'off' self.value = '0' else self.value = '1' end end self end |