Class: Docbert::Converters::StepDefinitions

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

Defined Under Namespace

Classes: ParameterizedContent

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



47
48
49
# File 'lib/docbert/converters/step_definitions.rb', line 47

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/step_definitions.rb', line 8

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