Class: CommaPile::LineParser
- Inherits:
-
Object
- Object
- CommaPile::LineParser
- Defined in:
- lib/comma_pile/line_parser.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Class Method Summary collapse
Instance Method Summary collapse
- #[](value) ⇒ Object
-
#initialize(line) ⇒ LineParser
constructor
A new instance of LineParser.
Constructor Details
#initialize(line) ⇒ LineParser
Returns a new instance of LineParser.
8 9 10 |
# File 'lib/comma_pile/line_parser.rb', line 8 def initialize(line) @line = line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
7 8 9 |
# File 'lib/comma_pile/line_parser.rb', line 7 def line @line end |
Class Method Details
.with(line) {|new(line)| ... } ⇒ Object
3 4 5 |
# File 'lib/comma_pile/line_parser.rb', line 3 def self.with(line) yield(new(line)) end |
Instance Method Details
#[](value) ⇒ Object
12 13 14 |
# File 'lib/comma_pile/line_parser.rb', line 12 def [](value) line[value] end |