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
Methods included from Gherkin::Formatter::Escaping
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index
745 746 747 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 745 def index @index end |
Instance Method Details
#examples_table(table, &descend) ⇒ Object
748 749 750 751 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 748 def examples_table(table, &descend) @result = char_length_of(table.header.values[index]) descend.call(self) end |
#examples_table_row(row, &descend) ⇒ Object
753 754 755 756 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 753 def examples_table_row(row, &descend) width = char_length_of(row.values[index]) @result = width if width > result end |
#result ⇒ Object
758 759 760 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 758 def result @result ||= 0 end |