Class: Docbert::Converters::Gherkin

Inherits:
Kramdown::Converter::Base
  • Object
show all
Defined in:
lib/docbert/converters/gherkin.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object (private)



64
65
66
# File 'lib/docbert/converters/gherkin.rb', line 64

def method_missing(name, *args)
  super if name.to_s !~ /^convert_/
end

Instance Method Details

#convert(root) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/docbert/converters/gherkin.rb', line 8

def convert(root)
  root.
    children.
    map { |el| send("convert_#{el.type}", el) }.
    compact.
    join("\n")
end