Class: MJ::VisitorBase

Inherits:
Object
  • Object
show all
Defined in:
lib/mj/visitor.rb

Overview

Base class for all Visitors.

Direct Known Subclasses

BuildTool::Cfg::ListVisitor

Defined Under Namespace

Classes: ArgumentsError

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configurationObject (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