Class: RIActions
- Inherits:
-
Object
- Object
- RIActions
- Defined in:
- lib/RIUI/RIActions.rb
Instance Method Summary collapse
- #active ⇒ Object
- #add(object) ⇒ Object
- #holding ⇒ Object
-
#initialize ⇒ RIActions
constructor
A new instance of RIActions.
- #initialized ⇒ Object
- #objects ⇒ Object
Constructor Details
#initialize ⇒ RIActions
Returns a new instance of RIActions.
4 5 6 7 8 |
# File 'lib/RIUI/RIActions.rb', line 4 def initialize @initialized = true @objects = [0] actions end |
Instance Method Details
#active ⇒ Object
19 |
# File 'lib/RIUI/RIActions.rb', line 19 def active; @active; end |
#add(object) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/RIUI/RIActions.rb', line 9 def add(object) if @objects[0] == 0 @objects.pop @objects.push(object) else @objects.push(object) end end |
#holding ⇒ Object
18 |
# File 'lib/RIUI/RIActions.rb', line 18 def holding; @holding; end |
#initialized ⇒ Object
20 |
# File 'lib/RIUI/RIActions.rb', line 20 def initialized; @initialized; end |
#objects ⇒ Object
21 |
# File 'lib/RIUI/RIActions.rb', line 21 def objects; @objects; end |