Class: MarsBase10::Stack::Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Node

Returns a new instance of Node.



12
13
14
15
# File 'lib/mars_base_10/stack.rb', line 12

def initialize data
  self.data = data
  self.next = nil
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



11
12
13
# File 'lib/mars_base_10/stack.rb', line 11

def data
  @data
end

#nextObject

Returns the value of attribute next.



11
12
13
# File 'lib/mars_base_10/stack.rb', line 11

def next
  @next
end