Class: Pegarus::UnaryOp

Inherits:
Pattern show all
Defined in:
lib/pegarus/ast/pattern.rb

Direct Known Subclasses

If, Unless

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Pattern

#*, #+, #+@, #-, #-@, #/, engine, #graph, #match, select_engine, #visit

Constructor Details

#initialize(pattern) ⇒ UnaryOp

Returns a new instance of UnaryOp.



114
115
116
# File 'lib/pegarus/ast/pattern.rb', line 114

def initialize(pattern)
  @pattern = Pegarus.pattern pattern
end

Instance Attribute Details

#patternObject

Returns the value of attribute pattern.



112
113
114
# File 'lib/pegarus/ast/pattern.rb', line 112

def pattern
  @pattern
end