Class: Canned::InmmutableStack::Entry
- Inherits:
-
Object
- Object
- Canned::InmmutableStack::Entry
- Defined in:
- lib/canned/stack.rb
Overview
Class used to hold stack entries
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
entry name.
-
#obj ⇒ Object
readonly
entry data.
-
#tag ⇒ Object
readonly
entry tag.
Instance Method Summary collapse
-
#initialize(_tag, _name, _obj) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(_tag, _name, _obj) ⇒ Entry
Returns a new instance of Entry.
18 19 20 21 22 |
# File 'lib/canned/stack.rb', line 18 def initialize(_tag, _name, _obj) @tag = _tag @name = _name.to_s @obj = _obj end |
Instance Attribute Details
#name ⇒ Object (readonly)
entry name
15 16 17 |
# File 'lib/canned/stack.rb', line 15 def name @name end |
#obj ⇒ Object (readonly)
entry data
16 17 18 |
# File 'lib/canned/stack.rb', line 16 def obj @obj end |
#tag ⇒ Object (readonly)
entry tag
14 15 16 |
# File 'lib/canned/stack.rb', line 14 def tag @tag end |