Class: Walle::Robot::Definitions::Stack
- Inherits:
-
Object
- Object
- Walle::Robot::Definitions::Stack
- Defined in:
- lib/walle/robot/definitions.rb
Instance Method Summary collapse
- #apply_to(client) ⇒ Object
- #current ⇒ Object
-
#initialize ⇒ Stack
constructor
A new instance of Stack.
- #push(definitions) ⇒ Object
Constructor Details
#initialize ⇒ Stack
Returns a new instance of Stack.
10 11 12 |
# File 'lib/walle/robot/definitions.rb', line 10 def initialize @entities = [] end |
Instance Method Details
#apply_to(client) ⇒ Object
22 23 24 25 26 |
# File 'lib/walle/robot/definitions.rb', line 22 def apply_to(client) @entities.each do |definitions| definitions.apply_to(client) end end |
#current ⇒ Object
18 19 20 |
# File 'lib/walle/robot/definitions.rb', line 18 def current @entities.last end |
#push(definitions) ⇒ Object
14 15 16 |
# File 'lib/walle/robot/definitions.rb', line 14 def push(definitions) @entities << definitions end |