Class: ABNF::Parser::Rules::Reference
- Inherits:
-
Object
- Object
- ABNF::Parser::Rules::Reference
- Defined in:
- lib/abnf/parser/rules/reference.rb
Instance Attribute Summary collapse
-
#rule_name ⇒ Object
readonly
Returns the value of attribute rule_name.
Instance Method Summary collapse
- #abnf ⇒ Object
- #call(io, rule_list) ⇒ Object
-
#initialize(rule_name) ⇒ Reference
constructor
A new instance of Reference.
Constructor Details
#initialize(rule_name) ⇒ Reference
Returns a new instance of Reference.
7 8 9 |
# File 'lib/abnf/parser/rules/reference.rb', line 7 def initialize rule_name @rule_name = rule_name end |
Instance Attribute Details
#rule_name ⇒ Object (readonly)
Returns the value of attribute rule_name.
5 6 7 |
# File 'lib/abnf/parser/rules/reference.rb', line 5 def rule_name @rule_name end |
Instance Method Details
#abnf ⇒ Object
11 12 13 |
# File 'lib/abnf/parser/rules/reference.rb', line 11 def abnf rule_name end |
#call(io, rule_list) ⇒ Object
15 16 17 18 |
# File 'lib/abnf/parser/rules/reference.rb', line 15 def call io, rule_list rule = rule_list.fetch rule_name rule.(io, rule_list) end |