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.7.0 lib/xcake/visitable.rb
xcake-0.6.25 lib/xcake/visitable.rb
xcake-0.6.24 lib/xcake/visitable.rb
xcake-0.6.23 lib/xcake/visitable.rb
xcake-0.6.22 lib/xcake/visitable.rb
xcake-0.6.21 lib/xcake/visitable.rb
xcake-0.6.20 lib/xcake/visitable.rb
xcake-0.6.19 lib/xcake/visitable.rb
xcake-0.6.18 lib/xcake/visitable.rb
xcake-0.6.17 lib/xcake/visitable.rb
xcake-0.6.16 lib/xcake/visitable.rb
xcake-0.6.14 lib/xcake/visitable.rb
xcake-0.6.13 lib/xcake/visitable.rb
xcake-0.6.12 lib/xcake/visitable.rb
xcake-0.6.11 lib/xcake/visitable.rb
xcake-0.6.10 lib/xcake/visitable.rb
xcake-0.6.9 lib/xcake/visitable.rb
xcake-0.6.8 lib/xcake/visitable.rb
xcake-0.6.7 lib/xcake/visitable.rb
xcake-0.6.6 lib/xcake/visitable.rb