Class: Melbourne::AST::Match
- Defined in:
- lib/melbourne/ast/control_flow.rb
Overview
A regular expression match statement as in:
x =~ /x/
Instance Attribute Summary collapse
-
#pattern ⇒ Object
the regex pattern used for the match.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, pattern, flags) ⇒ Match
constructor
A new instance of Match.
Methods inherited from Node
Constructor Details
#initialize(line, pattern, flags) ⇒ Match
Returns a new instance of Match.
233 234 235 236 |
# File 'lib/melbourne/ast/control_flow.rb', line 233 def initialize(line, pattern, flags) @line = line @pattern = RegexLiteral.new line, pattern, flags end |
Instance Attribute Details
#pattern ⇒ Object
the regex pattern used for the match
231 232 233 |
# File 'lib/melbourne/ast/control_flow.rb', line 231 def pattern @pattern end |