Class: StringIO::Data
- Inherits:
-
Object
- Object
- StringIO::Data
- Defined in:
- lib/rubysl/stringio/stringio.rb
Instance Attribute Summary collapse
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#lineno ⇒ Object
Returns the value of attribute lineno.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#string ⇒ Object
Returns the value of attribute string.
Instance Method Summary collapse
-
#initialize(string) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(string) ⇒ Data
Returns a new instance of Data.
22 23 24 25 26 |
# File 'lib/rubysl/stringio/stringio.rb', line 22 def initialize(string) @string = string @encoding = string.encoding @pos = @lineno = 0 end |
Instance Attribute Details
#encoding ⇒ Object
Returns the value of attribute encoding.
20 21 22 |
# File 'lib/rubysl/stringio/stringio.rb', line 20 def encoding @encoding end |
#lineno ⇒ Object
Returns the value of attribute lineno.
20 21 22 |
# File 'lib/rubysl/stringio/stringio.rb', line 20 def lineno @lineno end |
#pos ⇒ Object
Returns the value of attribute pos.
20 21 22 |
# File 'lib/rubysl/stringio/stringio.rb', line 20 def pos @pos end |
#string ⇒ Object
Returns the value of attribute string.
20 21 22 |
# File 'lib/rubysl/stringio/stringio.rb', line 20 def string @string end |