class Flexparser::AnonymousParser
A semi-anonymous class used for building the node structure.
Public Instance Methods
to_h()
click to toggle source
# File lib/flexparser/anonymous_parser.rb, line 14 def to_h self.class.parsers.each_with_object({}) do |parser, hash| hash[parser.name.to_sym] = public_send(parser.name) end end
to_s()
click to toggle source
Calls superclass method
# File lib/flexparser/anonymous_parser.rb, line 9 def to_s return super if self.class.parsers.empty? to_h.to_s end