Class: Stupidedi::Reader::SegmentDict
- Inherits:
-
Object
- Object
- Stupidedi::Reader::SegmentDict
- Includes:
- Inspect
- Defined in:
- lib/stupidedi/reader/segment_dict.rb
Constructors collapse
Instance Method Summary collapse
-
#at(segment_id)
abstract
Searches the stack for the definition of the given segment identifier.
-
#defined_at?(segment_id) ⇒ Boolean
abstract
Returns true if a node in the stack has a definition for the given segment identifier.
-
#empty? ⇒ Boolean
abstract
True if the stack of dictionaries is empty.
-
#pop ⇒ SegmentDict
Return the remainder of the stack.
-
#push(top) ⇒ SegmentDict
Returns a new SegmentDict with +top+ pushed to the top of the stack.
-
#top
abstract
Return the top element from the stack.
Methods included from Inspect
Class Method Details
.build(top) ⇒ SegmentDict::NonEmpty
165 166 167 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 165 def build(top) SegmentDict::Empty.push(top) end |
.empty ⇒ SegmentDict::Empty
160 161 162 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 160 def empty SegmentDict::Empty end |
Instance Method Details
#at(segment_id)
Searches the stack for the definition of the given segment identifier
25 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 25 abstract :at, :args => %w(segment_id) |
#defined_at?(segment_id) ⇒ Boolean
Returns true if a node in the stack has a definition for the given segment identifier
29 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 29 abstract :defined_at?, :args => %w(segment_id) |
#empty? ⇒ Boolean
True if the stack of dictionaries is empty
32 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 32 abstract :empty? |
#pop ⇒ SegmentDict
Return the remainder of the stack. This will throw an exception if the stack is #empty?
17 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 17 abstract :pop |
#push(top) ⇒ SegmentDict
Returns a new SegmentDict with +top+ pushed to the top of the stack
22 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 22 abstract :push, :args => %w(top) |
#top
Return the top element from the stack. This will throw an exception if the stack is #empty?
11 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 11 abstract :top |