Sha256: 0afa9050fe0d160386563e120416e3494b3a47fbc457c0b607531de0e56fe557

Contents?: true

Size: 373 Bytes

Versions: 1

Compression:

Stored size: 373 Bytes

Contents

module Veritas

  # A mixin to allow instances to be visited
  module Visitable

    # Accept a visitor and dispatch the object to the visitor
    #
    # @param [#visit] visitor
    #   the visitor object
    #
    # @return [self]
    #
    # @api public
    def accept(visitor)
      visitor.visit(self)
      self
    end

  end # module Visitable
end # module Veritas

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 lib/veritas/support/visitable.rb