Class: KPeg::Rule
- Inherits:
-
Object
- Object
- KPeg::Rule
- Defined in:
- lib/kpeg/grammar.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#op ⇒ Object
readonly
Returns the value of attribute op.
Instance Method Summary collapse
-
#initialize(name, op, args = nil) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(name, op, args = nil) ⇒ Rule
Returns a new instance of Rule.
7 8 9 10 11 |
# File 'lib/kpeg/grammar.rb', line 7 def initialize(name, op, args=nil) @name = name @op = op @arguments = args end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
13 14 15 |
# File 'lib/kpeg/grammar.rb', line 13 def arguments @arguments end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
13 14 15 |
# File 'lib/kpeg/grammar.rb', line 13 def name @name end |
#op ⇒ Object (readonly)
Returns the value of attribute op.
13 14 15 |
# File 'lib/kpeg/grammar.rb', line 13 def op @op end |