Module: Canis::FocusManager
Instance Attribute Summary collapse
-
#focusables ⇒ Object
readonly
Returns the value of attribute focusables.
Instance Method Summary collapse
-
#add(component) ⇒ Object
add a component to this list so it can be made focusable later.
- #make_focusable(bool = true) ⇒ Object
- #toggle_focusable ⇒ Object
Instance Attribute Details
#focusables ⇒ Object (readonly)
Returns the value of attribute focusables.
14 15 16 |
# File 'lib/canis/core/util/focusmanager.rb', line 14 def focusables @focusables end |
Instance Method Details
#add(component) ⇒ Object
add a component to this list so it can be made focusable later
16 17 18 19 20 |
# File 'lib/canis/core/util/focusmanager.rb', line 16 def add component @focusables ||= [] @focusables << component self end |
#make_focusable(bool = true) ⇒ Object
21 22 23 24 |
# File 'lib/canis/core/util/focusmanager.rb', line 21 def make_focusable bool=true @focusing = bool @focusables.each { |e| e.focusable(bool) } end |