Class: MJ::VisitorBase
- Inherits:
-
Object
- Object
- MJ::VisitorBase
- Defined in:
- lib/mj/visitor.rb
Overview
Base class for all Visitors.
Direct Known Subclasses
Defined Under Namespace
Classes: ArgumentsError
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
The configuration object to fill with our parse results.
Instance Method Summary collapse
-
#initialize(configuration) ⇒ VisitorBase
constructor
A new instance of VisitorBase.
- #visit_Object(object) ⇒ Object
Constructor Details
#initialize(configuration) ⇒ VisitorBase
Returns a new instance of VisitorBase.
34 35 36 |
# File 'lib/mj/visitor.rb', line 34 def initialize( configuration ) @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
The configuration object to fill with our parse results.
29 30 31 |
# File 'lib/mj/visitor.rb', line 29 def configuration @configuration end |
Instance Method Details
#visit_Object(object) ⇒ Object
38 39 40 |
# File 'lib/mj/visitor.rb', line 38 def visit_Object( object ) raise "#{self.class}: Not a visitor for #{object.class}!" end |