class ManiokBdd::GherkinFormatter::GherkinCollection
Attributes
elements[R]
Public Class Methods
new(gherkin_object)
click to toggle source
# File lib/maniok_bdd/gherkin_formatter.rb, line 40 def initialize(gherkin_object) @gherkin_object = gherkin_object @elements = [] end
Public Instance Methods
to_s()
click to toggle source
# File lib/maniok_bdd/gherkin_formatter.rb, line 45 def to_s <<RUBY #{gherkin_to_maniok_block} do #{print_elements} end RUBY end
Private Instance Methods
gherkin_model_name()
click to toggle source
# File lib/maniok_bdd/gherkin_formatter.rb, line 60 def gherkin_model_name @gherkin_object.class.name.split('::').last end
gherkin_to_maniok_block()
click to toggle source
# File lib/maniok_bdd/gherkin_formatter.rb, line 56 def gherkin_to_maniok_block "#{gherkin_model_name} \"#{@gherkin_object.name}\"" end
print_elements()
click to toggle source
# File lib/maniok_bdd/gherkin_formatter.rb, line 64 def print_elements @elements.map do |element| element.to_s end.join("\n") end