Method: Bison::Rule#initialize
- Defined in:
- lib/bison/rule.rb
#initialize(name, components = []) ⇒ Rule
Returns a new instance of Rule.
6 7 8 9 |
# File 'lib/bison/rule.rb', line 6 def initialize(name, components=[]) @name, @components = name, components components.each_with_index{ |x, i| x.index = i; x.rule = self } end |