Module: Axiom::Visitable

Included in:
Attribute, Function, Relation
Defined in:
lib/axiom/support/visitable.rb

Overview

A mixin to allow instances to be visited

Instance Method Summary collapse

Instance Method Details

#accept(visitor) ⇒ self

Accept a visitor and dispatch the object to the visitor

Examples:

visitable = visitable.accept(visitor)

Parameters:

  • visitor (#visit)

    the visitor object

Returns:

  • (self)


19
20
21
22
# File 'lib/axiom/support/visitable.rb', line 19

def accept(visitor)
  visitor.visit(self)
  self
end