Class: Cucumber::Formatter::LegacyApi::Adapter::ExamplesTablePrinter::LegacyTable::FindMaxWidth
- Inherits:
-
Struct
- Object
- Struct
- Cucumber::Formatter::LegacyApi::Adapter::ExamplesTablePrinter::LegacyTable::FindMaxWidth
- Includes:
- Gherkin::Formatter::Escaping
- Defined in:
- lib/cucumber/formatter/legacy_api/adapter.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
Instance Method Summary collapse
- #examples_table(table, &descend) ⇒ Object
- #examples_table_row(row, &descend) ⇒ Object
- #result ⇒ Object
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index
747 748 749 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 747 def index @index end |
Instance Method Details
#examples_table(table, &descend) ⇒ Object
750 751 752 753 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 750 def examples_table(table, &descend) @result = char_length_of(table.header.values[index]) descend.call(self) end |
#examples_table_row(row, &descend) ⇒ Object
755 756 757 758 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 755 def examples_table_row(row, &descend) width = char_length_of(row.values[index]) @result = width if width > result end |
#result ⇒ Object
760 761 762 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 760 def result @result ||= 0 end |