Module: Nuklear::UI::Enableable
- Included in:
- Base
- Defined in:
- lib/nuklear/ui/enableable.rb
Instance Method Summary collapse
- #disable ⇒ Object
- #disabled=(a) ⇒ Object
- #disabled? ⇒ Boolean
- #enable ⇒ Object
- #enabled=(a) ⇒ Object
- #enabled? ⇒ Boolean
Instance Method Details
#disable ⇒ Object
16 17 18 |
# File 'lib/nuklear/ui/enableable.rb', line 16 def disable self.enabled = false end |
#disabled=(a) ⇒ Object
8 9 10 |
# File 'lib/nuklear/ui/enableable.rb', line 8 def disabled=(a) self.enabled = !a end |
#disabled? ⇒ Boolean
24 25 26 |
# File 'lib/nuklear/ui/enableable.rb', line 24 def disabled? !enabled? end |
#enable ⇒ Object
12 13 14 |
# File 'lib/nuklear/ui/enableable.rb', line 12 def enable self.enabled = true end |
#enabled=(a) ⇒ Object
4 5 6 |
# File 'lib/nuklear/ui/enableable.rb', line 4 def enabled=(a) @enabled = a end |
#enabled? ⇒ Boolean
20 21 22 |
# File 'lib/nuklear/ui/enableable.rb', line 20 def enabled? @enabled.nil? ? true : @enabled end |