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
757 758 759 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 757 def index @index end |
Instance Method Details
#examples_table(table, &descend) ⇒ Object
760 761 762 763 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 760 def examples_table(table, &descend) @result = char_length_of(table.header.values[index]) descend.call(self) end |
#examples_table_row(row, &_descend) ⇒ Object
765 766 767 768 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 765 def examples_table_row(row, &_descend) width = char_length_of(row.values[index]) @result = width if width > result end |
#result ⇒ Object
770 771 772 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 770 def result @result ||= 0 end |