Sha256: 7367d7f183e1a9431d6a1d0fa3e0c644ad1d369077f3da74d8813ad40aaf6ef2

Contents?: true

Size: 540 Bytes

Versions: 62

Compression:

Stored size: 540 Bytes

Contents

module Xcake
  # This namespace provides all of methods for
  # implementing the Visitable in the  Visitor pattern.
  #
  module Visitable
    # This method accepts the visitors.
    #
    # The default implementatio lets the
    # visitor visit then leave.
    #
    # Override this if you need to allow
    # visitors to visit properties of a
    # class.
    #
    # @param [Visitor] visitor
    #                  the visitor to accept
    #
    def accept(visitor)
      visitor.visit(self)
      visitor.leave(self)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
xcake-0.13.0 lib/xcake/visitable.rb
xcake-0.12.1 lib/xcake/visitable.rb
xcake-0.12.0 lib/xcake/visitable.rb
xcake-0.11.0 lib/xcake/visitable.rb
xcake-0.10.0 lib/xcake/visitable.rb
xcake-0.9.4 lib/xcake/visitable.rb
xcake-0.9.3 lib/xcake/visitable.rb
xcake-0.9.2 lib/xcake/visitable.rb
xcake-0.9.1 lib/xcake/visitable.rb
xcake-0.9.0 lib/xcake/visitable.rb
xcake-0.8.13 lib/xcake/visitable.rb
xcake-0.8.12 lib/xcake/visitable.rb
xcake-0.8.10 lib/xcake/visitable.rb
xcake-0.8.9 lib/xcake/visitable.rb
xcake-0.8.8 lib/xcake/visitable.rb
xcake-0.8.7 lib/xcake/visitable.rb
xcake-0.8.6 lib/xcake/visitable.rb
xcake-0.8.3 lib/xcake/visitable.rb
xcake-0.8.1 lib/xcake/visitable.rb
xcake-0.7.1 lib/xcake/visitable.rb