Class: Refract::MatchPredicateNode
- Defined in:
- lib/refract/nodes/match_predicate_node.rb
Instance Attribute Summary collapse
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(prism_node: nil, value:, pattern:) ⇒ MatchPredicateNode
constructor
A new instance of MatchPredicateNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, value:, pattern:) ⇒ MatchPredicateNode
Returns a new instance of MatchPredicateNode.
5 6 7 8 9 10 |
# File 'lib/refract/nodes/match_predicate_node.rb', line 5 def initialize(prism_node: nil, value:, pattern:) @prism_node = prism_node => Prism::Node | nil @value = value @pattern = pattern freeze end |
Instance Attribute Details
#pattern ⇒ Object
Returns the value of attribute pattern.
12 13 14 |
# File 'lib/refract/nodes/match_predicate_node.rb', line 12 def pattern @pattern end |
#value ⇒ Object
Returns the value of attribute value.
12 13 14 |
# File 'lib/refract/nodes/match_predicate_node.rb', line 12 def value @value end |