Class: L43Peg::Success

Inherits:
Object
  • Object
show all
Extended by:
L43::OpenObject
Defined in:
lib/l43_peg/success.rb

Instance Method Summary collapse

Instance Method Details

#debugObject



11
12
13
14
15
16
# File 'lib/l43_peg/success.rb', line 11

def debug
  "Success<" +
    [
      "ast:#{ast.inspect}", "cache:#{cache.cache.inspect}", "rest:#{rest.input.inspect}"
    ].join(" ") + ">"
end

#map(&mapper) ⇒ Object



17
18
19
20
# File 'lib/l43_peg/success.rb', line 17

def map(&mapper)
  update_attribute(:ast, &mapper)
  # self.class.new(ast: mapper.(ast), cache:, position:, rest:)
end