Class: Stupidedi::Reader::AbstractInput
Overview
Note:
Provides an abstract interface for a positioned cursor within an element-based input stream. The main operations are implemented by the #take and #drop methods.
The DelegatedInput subclass wraps values that already implement the interface, like String and Array. The FileInput subclass wraps opened ‘IO` streams like `File`, and possibly others.
Direct Known Subclasses
Querying the Position collapse
-
#position ⇒ String
The file name, URI, etc that identifies the input stream.
Reading the Input collapse
-
#index ⇒ Integer
Returns the smallest ‘n`, where #at`(n)` == `element`.
Advancing the Cursor collapse
-
#drop ⇒ AbstractInput
Advance the cursor forward ‘n` elements.
Methods included from Inspect
Instance Method Details
#drop ⇒ AbstractInput
Advance the cursor forward ‘n` elements
116 |
# File 'lib/stupidedi/reader/input/abstract_input.rb', line 116 abstract :drop, :args => %w(n) |
#index ⇒ Integer
Returns the smallest ‘n`, where #at`(n)` == `element`
106 |
# File 'lib/stupidedi/reader/input/abstract_input.rb', line 106 abstract :index, :args => %w(element) |
#position ⇒ String
The file name, URI, etc that identifies the input stream
58 |
# File 'lib/stupidedi/reader/input/abstract_input.rb', line 58 abstract :position |