Class: Bogo::Stack::Entry
- Inherits:
-
Object
- Object
- Bogo::Stack::Entry
- Defined in:
- lib/bogo/stack.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Instance Method Summary collapse
-
#initialize(identifier:, action:) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(identifier:, action:) ⇒ Entry
Returns a new instance of Entry.
178 179 180 181 182 183 184 |
# File 'lib/bogo/stack.rb', line 178 def initialize(identifier:, action:) if !action.is_a?(Action) raise TypeError, "Expecting `#{Action.name}` but received `#{action.class.name}`" end @identifier = identifier @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
176 177 178 |
# File 'lib/bogo/stack.rb', line 176 def action @action end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
175 176 177 |
# File 'lib/bogo/stack.rb', line 175 def identifier @identifier end |