class Generated::IncludeRule

Represents a rule in the form of { include = '#rule_name'; }

Attributes

rule[RW]

@return [String] The included Rule name

Public Class Methods

new(location, rule) click to toggle source
Calls superclass method Generated::Rule::new
# File lib/ruby_grammar_builder/generated/rule.rb, line 20
def initialize(location, rule)
    super(location)
    @rule = rule
end

Public Instance Methods

to_h() click to toggle source
# File lib/ruby_grammar_builder/generated/rule.rb, line 25
def to_h
    {"include" => @rule}
end