Method: CodeBreaker::Parsable::Node#method_missing

Defined in:
lib/code_breaker/parsable/node.rb

#method_missing(method, *args, &block) ⇒ Object



35
36
37
38
39
40
41
42
43
44
# File 'lib/code_breaker/parsable/node.rb', line 35

def method_missing(method, *args, &block)
  matches = method.to_s.match(/^parse_(.+)_node$/)
  node_type = matches ? matches.captures.first : []

  if node_type.empty?
    super
  else
    raise NotImplementedError, not_implemented_message(node_type)
  end
end