Class: Cucumber::Formatter::LegacyApi::Adapter::Indent
- Defined in:
- lib/cucumber/formatter/legacy_api/adapter.rb
Instance Method Summary collapse
- #examples_table ⇒ Object
- #examples_table_row ⇒ Object
-
#initialize(node) ⇒ Indent
constructor
A new instance of Indent.
- #of(node) ⇒ Object
- #record_width_of(node) ⇒ Object
Constructor Details
#initialize(node) ⇒ Indent
Returns a new instance of Indent.
897 898 899 900 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 897 def initialize(node) @widths = [] node.describe_to(self) end |
Instance Method Details
#examples_table ⇒ Object
915 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 915 def examples_table(*); end |
#examples_table_row ⇒ Object
916 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 916 def examples_table_row(*); end |
#of(node) ⇒ Object
918 919 920 921 922 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 918 def of(node) # The length of the instantiated steps in --expand mode are currently # not included in the calculation of max => make sure to return >= 1 [1, max - node.name.length - node.keyword.length].max end |
#record_width_of(node) ⇒ Object
924 925 926 |
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 924 def record_width_of(node) @widths << node.keyword.length + node.name.length + 1 end |