Class: Stupidedi::Reader::SegmentDict

Inherits:
Object
  • Object
show all
Includes:
Inspect
Defined in:
lib/stupidedi/reader/segment_dict.rb

Constructors collapse

Instance Method Summary collapse

Methods included from Inspect

#inspect

Class Method Details

.build(top) ⇒ SegmentDict::NonEmpty

Returns:

  • (SegmentDict::NonEmpty)


167
168
169
# File 'lib/stupidedi/reader/segment_dict.rb', line 167

def build(top)
  SegmentDict::Empty.push(top)
end

.emptySegmentDict::Empty

Returns:

  • (SegmentDict::Empty)


162
163
164
# File 'lib/stupidedi/reader/segment_dict.rb', line 162

def empty
  SegmentDict::Empty
end

Instance Method Details

#popSegmentDict

Return the remainder of the stack. This will throw an exception if the stack is #empty?

Returns:



19
# File 'lib/stupidedi/reader/segment_dict.rb', line 19

abstract :pop

#pushSegmentDict

Returns a new SegmentDict with +top+ pushed to the top of the stack

Returns:



24
# File 'lib/stupidedi/reader/segment_dict.rb', line 24

abstract :push, :args => %w(top)