Class: Cucumber::Formatter::LegacyApi::Adapter::Indent

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/formatter/legacy_api/adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Indent


909
910
911
912
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 909

def initialize(node)
  @widths = []
  node.describe_to(self)
end

Instance Method Details

#examples_tableObject


927
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 927

def examples_table(*); end

#examples_table_rowObject


928
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 928

def examples_table_row(*); end

#of(node) ⇒ Object


930
931
932
933
934
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 930

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.to_s.length - node.keyword.length].max
end

#record_width_of(node) ⇒ Object


936
937
938
# File 'lib/cucumber/formatter/legacy_api/adapter.rb', line 936

def record_width_of(node)
  @widths << node.keyword.length + node.to_s.length + 1
end