Parent

Gherkin::Formatter::JSONFormatter

Public Class Methods

new(io) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 11
11:       def initialize(io)
12:         @io = io
13:       end

Public Instance Methods

background(background) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 22
22:       def background(background)
23:         feature_elements << background.to_hash
24:       end
eof() click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 42
42:       def eof
43:         @io.write(@feature_hash.to_json)
44:       end
examples(examples) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 34
34:       def examples(examples)
35:         all_examples << examples.to_hash
36:       end
feature(feature) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 18
18:       def feature(feature)
19:         @feature_hash = feature.to_hash
20:       end
scenario(scenario) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 26
26:       def scenario(scenario)
27:         feature_elements << scenario.to_hash
28:       end
scenario_outline(scenario_outline) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 30
30:       def scenario_outline(scenario_outline)
31:         feature_elements << scenario_outline.to_hash
32:       end
step(step) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 38
38:       def step(step)
39:         steps << step.to_hash
40:       end
uri(uri) click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 15
15:       def uri(uri)
16:       end

Private Instance Methods

all_examples() click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 56
56:       def all_examples
57:         feature_element['examples'] ||= []
58:       end
feature_element() click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 52
52:       def feature_element
53:         feature_elements[1]
54:       end
feature_elements() click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 48
48:       def feature_elements
49:         @feature_hash['elements'] ||= []
50:       end
steps() click to toggle source
    # File lib/gherkin/formatter/json_formatter.rb, line 60
60:       def steps
61:         feature_element['steps'] ||= []
62:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.