Class: Kenma::PatternCapture

Inherits:
Struct
  • Object
show all
Defined in:
lib/kenma/macro/macro_pattern.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pat_node) ⇒ PatternCapture

Returns a new instance of PatternCapture.



10
11
12
# File 'lib/kenma/macro/macro_pattern.rb', line 10

def initialize(pat_node)
  self.pat_node = pat_node
end

Instance Attribute Details

#pat_nodeObject

Returns the value of attribute pat_node

Returns:

  • (Object)

    the current value of pat_node



9
10
11
# File 'lib/kenma/macro/macro_pattern.rb', line 9

def pat_node
  @pat_node
end

Instance Method Details

#match(node) ⇒ Object Also known as: ===



14
15
16
# File 'lib/kenma/macro/macro_pattern.rb', line 14

def match(node)
  _match(node, pat_node)
end