class TurnipFormatter::Renderer::Html::Step

@resource [TurnipFormatter::Resource::Step]

Public Instance Methods

argument() click to toggle source
# File lib/turnip_formatter/renderer/html/step.rb, line 20
def argument
  @argument ||= case @resource.argument
                when ::Turnip::Table
                  DataTable.new(@resource.argument).render
                when String
                  DocString.new(@resource.argument).render
                end
end
extra_information() click to toggle source
# File lib/turnip_formatter/renderer/html/step.rb, line 29
def extra_information
  extra_information_templates.map do |template, method|
    template.send(method, @resource)
  end.join("\n")
end
has_appendix?() click to toggle source
# File lib/turnip_formatter/renderer/html/step.rb, line 35
def has_appendix?
  !!argument or !extra_information_templates.empty?
end
keyword() click to toggle source
# File lib/turnip_formatter/renderer/html/step.rb, line 16
def keyword
  @resource.keyword.strip
end

Private Instance Methods

extra_information_templates() click to toggle source
# File lib/turnip_formatter/renderer/html/step.rb, line 41
def extra_information_templates
  @extra_information_templates ||= TurnipFormatter.step_templates_for(status)
end