Parent

Methods

Gherkin::Formatter::Model::Hashable

Public Instance Methods

to_hash() click to toggle source
    # File lib/gherkin/formatter/model.rb, line 7
 7:         def to_hash
 8:           instance_variables.inject({}) do |hash, ivar|
 9:             value = instance_variable_get(ivar)
10:             value = value.to_hash if value.respond_to?(:to_hash)
11:             if Array === value
12:               value = value.map do |e|
13:                 e.respond_to?(:to_hash) ? e.to_hash : e
14:               end
15:             end
16:             hash[ivar[1..1]] = value unless [[], nil].index(value)
17:             hash
18:           end
19:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.