Class: ABNF::Parser::Compiler::Frame
- Inherits:
-
Object
- Object
- ABNF::Parser::Compiler::Frame
- Defined in:
- lib/abnf/parser/compiler.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#rule_builder ⇒ Object
readonly
Returns the value of attribute rule_builder.
Instance Method Summary collapse
- #call(token) ⇒ Object
- #exited(rule) ⇒ Object
-
#initialize(rule_builder, block) ⇒ Frame
constructor
A new instance of Frame.
Constructor Details
#initialize(rule_builder, block) ⇒ Frame
Returns a new instance of Frame.
78 79 80 81 |
# File 'lib/abnf/parser/compiler.rb', line 78 def initialize rule_builder, block @block = block @rule_builder = rule_builder end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
75 76 77 |
# File 'lib/abnf/parser/compiler.rb', line 75 def block @block end |
#rule_builder ⇒ Object (readonly)
Returns the value of attribute rule_builder.
76 77 78 |
# File 'lib/abnf/parser/compiler.rb', line 76 def rule_builder @rule_builder end |
Instance Method Details
#call(token) ⇒ Object
83 84 85 |
# File 'lib/abnf/parser/compiler.rb', line 83 def call token rule_builder.(token) end |
#exited(rule) ⇒ Object
87 88 89 |
# File 'lib/abnf/parser/compiler.rb', line 87 def exited rule block.(rule) if block end |