Class: Gherkin::Formatter::Model::Statement
- Inherits:
-
Object
- Object
- Gherkin::Formatter::Model::Statement
- Defined in:
- lib/gherkin/formatter/model.rb
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(comments, tags, keyword, name, description, line) ⇒ Statement
constructor
A new instance of Statement.
- #line_range ⇒ Object
Constructor Details
#initialize(comments, tags, keyword, name, description, line) ⇒ Statement
Returns a new instance of Statement.
64 65 66 |
# File 'lib/gherkin/formatter/model.rb', line 64 def initialize(comments, , keyword, name, description, line) @comments, @tags, @keyword, @name, @description, @line = comments, , keyword, name, description, line end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
62 63 64 |
# File 'lib/gherkin/formatter/model.rb', line 62 def comments @comments end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
62 63 64 |
# File 'lib/gherkin/formatter/model.rb', line 62 def description @description end |
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
62 63 64 |
# File 'lib/gherkin/formatter/model.rb', line 62 def keyword @keyword end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
62 63 64 |
# File 'lib/gherkin/formatter/model.rb', line 62 def line @line end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
62 63 64 |
# File 'lib/gherkin/formatter/model.rb', line 62 def name @name end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
62 63 64 |
# File 'lib/gherkin/formatter/model.rb', line 62 def @tags end |
Instance Method Details
#line_range ⇒ Object
68 69 70 71 |
# File 'lib/gherkin/formatter/model.rb', line 68 def line_range first = @comments[0] ? @comments[0].line : (@tags[0] ? @tags[0].line : line) first..line end |