Class: Bogo::Stack::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/bogo/stack.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



176
177
178
# File 'lib/bogo/stack.rb', line 176

def action
  @action
end

#identifierObject (readonly)

Returns the value of attribute identifier.



175
176
177
# File 'lib/bogo/stack.rb', line 175

def identifier
  @identifier
end