Class: List::Matcher::Leaf

Inherits:
Node
  • Object
show all
Defined in:
lib/list_matcher.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#engine, #optional, #root, #symbols

Instance Method Summary collapse

Methods inherited from Node

#bound, #children, #finalize, #flatten, #optional?, #pfx, #qmark, #quote, #root?, #wrap

Constructor Details

#initialize(engine, c) ⇒ Leaf

Returns a new instance of Leaf.



713
714
715
716
# File 'lib/list_matcher.rb', line 713

def initialize(engine, c)
  super(engine, nil)
  @c = c
end

Instance Attribute Details

#cObject (readonly)

Returns the value of attribute c.



711
712
713
# File 'lib/list_matcher.rb', line 711

def c
  @c
end

Instance Method Details

#atomic?Boolean

Returns:

  • (Boolean)


718
719
720
# File 'lib/list_matcher.rb', line 718

def atomic?
  true
end

#convertObject



722
723
724
725
# File 'lib/list_matcher.rb', line 722

def convert
  rx = quote c
  finalize rx
end