Class/Module Index [+]

Quicksearch

Gherkin::Formatter::Model::Step

Attributes

multiline_arg[RW]

Public Instance Methods

line_range() click to toggle source
# File lib/gherkin/formatter/model.rb, line 117
def line_range
  range = super
  case multiline_arg
  when Array
    range = range.first..multiline_arg[-1].line
  when Model::DocString
    range = range.first..multiline_arg.line_range.last
  end
  range
end
outline_args() click to toggle source
# File lib/gherkin/formatter/model.rb, line 132
def outline_args
  offset = 0
  name.scan(/<[^<]*>/).map do |val|
    offset = name.index(val, offset)
    Argument.new(offset, val)
  end
end
replay(formatter) click to toggle source
# File lib/gherkin/formatter/model.rb, line 128
def replay(formatter)
  formatter.step(self)
end
to_hash() click to toggle source
# File lib/gherkin/formatter/model.rb, line 140
def to_hash
  hash = super
  if Array === @multiline_arg
    hash['multiline_arg'] = {
      'type' => 'table',
      'value' => hash['multiline_arg']
    }
  elsif DocString === @multiline_arg
    hash['multiline_arg']['type'] = 'doc_string'
  end
  hash
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.