Class: Saviour::StringSource
- Inherits:
-
Object
- Object
- Saviour::StringSource
- Defined in:
- lib/saviour/string_source.rb
Instance Method Summary collapse
-
#initialize(value, filename = nil) ⇒ StringSource
constructor
A new instance of StringSource.
- #original_filename ⇒ Object
- #read(*args) ⇒ Object
- #rewind ⇒ Object
Constructor Details
#initialize(value, filename = nil) ⇒ StringSource
Returns a new instance of StringSource.
3 4 5 6 |
# File 'lib/saviour/string_source.rb', line 3 def initialize(value, filename = nil) @value = StringIO.new(value) @filename = filename end |
Instance Method Details
#original_filename ⇒ Object
16 17 18 |
# File 'lib/saviour/string_source.rb', line 16 def original_filename @filename end |
#read(*args) ⇒ Object
8 9 10 |
# File 'lib/saviour/string_source.rb', line 8 def read(*args) @value.read(*args) end |
#rewind ⇒ Object
12 13 14 |
# File 'lib/saviour/string_source.rb', line 12 def rewind @value.rewind end |