Module: Cucumber::Core::Ast::Names

Included in:
Background, ExamplesTable, Feature, Scenario, ScenarioOutline
Defined in:
lib/cucumber/core/ast/names.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



5
6
7
# File 'lib/cucumber/core/ast/names.rb', line 5

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/cucumber/core/ast/names.rb', line 5

def name
  @name
end

Instance Method Details

#inspectObject



17
18
19
20
# File 'lib/cucumber/core/ast/names.rb', line 17

def inspect
  keyword_and_name = [keyword, name].join(": ")
  %{#<#{self.class} "#{keyword_and_name}" (#{location})>}
end

#legacy_conflated_name_and_descriptionObject



7
8
9
10
11
# File 'lib/cucumber/core/ast/names.rb', line 7

def legacy_conflated_name_and_description
  s = name
  s += "\n#{@description}" if @description != ""
  s
end

#to_sObject



13
14
15
# File 'lib/cucumber/core/ast/names.rb', line 13

def to_s
  name
end