Class: Canned::InmmutableStack::Entry

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

Overview

 Class used to hold stack entries

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

entry name



15
16
17
# File 'lib/canned/stack.rb', line 15

def name
  @name
end

#objObject (readonly)

 entry data



16
17
18
# File 'lib/canned/stack.rb', line 16

def obj
  @obj
end

#tagObject (readonly)

entry tag



14
15
16
# File 'lib/canned/stack.rb', line 14

def tag
  @tag
end