Gherkin::Formatter::Model::Step

Attributes

multiline_arg[RW]
result[RW]

Public Class Methods

new(comments, keyword, name, description, line, multiline_arg=nil, result=nil) click to toggle source
     # File lib/gherkin/formatter/model.rb, line 123
123:         def initialize(comments, keyword, name, description, line, multiline_arg=nil, result=nil)
124:           super(comments, keyword, name, nil, line)
125:           @multiline_arg = multiline_arg
126:           @result = result
127:         end

Public Instance Methods

line_range() click to toggle source
     # File lib/gherkin/formatter/model.rb, line 129
129:         def line_range
130:           range = super
131:           case multiline_arg
132:           when Array
133:             range = range.first..multiline_arg[1].line
134:           when Model::PyString
135:             range = range.first..multiline_arg.line_range.last
136:           end
137:           range
138:         end
replay(formatter) click to toggle source
     # File lib/gherkin/formatter/model.rb, line 140
140:         def replay(formatter)
141:           formatter.step(self)
142:         end
to_hash() click to toggle source
     # File lib/gherkin/formatter/model.rb, line 144
144:         def to_hash
145:           hash = super
146:           if Array === @multiline_arg
147:             hash['multiline_arg'] = {
148:               'type' => 'table',
149:               'value' => hash['multiline_arg']
150:             }
151:           elsif PyString === @multiline_arg
152:             hash['multiline_arg']['type'] = 'py_string'
153:           end
154:           hash
155:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.