Class: CucumberAnalytics::Row
- Inherits:
-
Object
- Object
- CucumberAnalytics::Row
- Includes:
- Nested, Raw, Sourceable
- Defined in:
- lib/cucumber_analytics/row.rb
Overview
A class modeling a Cucumber Examples table row.
Instance Attribute Summary collapse
-
#cells ⇒ Object
The cells that make up the row.
Attributes included from Nested
Attributes included from Raw
Attributes included from Sourceable
Instance Method Summary collapse
-
#initialize(source = nil) ⇒ Row
constructor
Creates a new Row object and, if source is provided, populates the object.
-
#to_s ⇒ Object
Returns a gherkin representation of the row.
Methods included from Nested
Constructor Details
#initialize(source = nil) ⇒ Row
Creates a new Row object and, if source is provided, populates the object.
18 19 20 21 22 23 24 |
# File 'lib/cucumber_analytics/row.rb', line 18 def initialize(source = nil) parsed_row = process_source(source) @cells = [] build_row(parsed_row) if parsed_row end |
Instance Attribute Details
#cells ⇒ Object
The cells that make up the row
13 14 15 |
# File 'lib/cucumber_analytics/row.rb', line 13 def cells @cells end |
Instance Method Details
#to_s ⇒ Object
Returns a gherkin representation of the row.
27 28 29 |
# File 'lib/cucumber_analytics/row.rb', line 27 def to_s "| #{cells.join(' | ')} |" end |