Class: Gherkin::Formatter::Model::PyString
- Defined in:
- lib/gherkin/formatter/model.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(value, line) ⇒ PyString
constructor
A new instance of PyString.
- #line_range ⇒ Object
Methods inherited from Hashable
Constructor Details
#initialize(value, line) ⇒ PyString
Returns a new instance of PyString.
187 188 189 |
# File 'lib/gherkin/formatter/model.rb', line 187 def initialize(value, line) @value, @line = value, line end |
Instance Attribute Details
#line ⇒ Object (readonly)
Returns the value of attribute line.
185 186 187 |
# File 'lib/gherkin/formatter/model.rb', line 185 def line @line end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
185 186 187 |
# File 'lib/gherkin/formatter/model.rb', line 185 def value @value end |
Instance Method Details
#line_range ⇒ Object
191 192 193 194 |
# File 'lib/gherkin/formatter/model.rb', line 191 def line_range line_count = value.split(/\r?\n/).length line..(line+line_count+1) end |