Module: Nuklear::UI::Enableable

Included in:
Base
Defined in:
lib/nuklear/ui/enableable.rb

Instance Method Summary collapse

Instance Method Details

#disableObject



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

Returns:

  • (Boolean)


24
25
26
# File 'lib/nuklear/ui/enableable.rb', line 24

def disabled?
  !enabled?
end

#enableObject



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

Returns:

  • (Boolean)


20
21
22
# File 'lib/nuklear/ui/enableable.rb', line 20

def enabled?
  @enabled.nil? ? true : @enabled
end