Class: ManiokBdd::GherkinFormatter::GherkinCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/maniok_bdd/gherkin_formatter.rb

Direct Known Subclasses

Feature, Scenario

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(gherkin_object) ⇒ GherkinCollection

Returns a new instance of GherkinCollection.



40
41
42
43
# File 'lib/maniok_bdd/gherkin_formatter.rb', line 40

def initialize(gherkin_object)
  @gherkin_object = gherkin_object
  @elements = []
end

Instance Attribute Details

#elementsObject (readonly)

Returns the value of attribute elements.



38
39
40
# File 'lib/maniok_bdd/gherkin_formatter.rb', line 38

def elements
  @elements
end

Instance Method Details

#to_sObject



45
46
47
48
49
50
51
52
# File 'lib/maniok_bdd/gherkin_formatter.rb', line 45

def to_s
  <<RUBY
#{gherkin_to_maniok_block} do

#{print_elements}
end
RUBY
end