Sha256: 9c9c0b8489a9e9a387f81a9f3c919bb0d03da6de7000db7de68ba7f088aaf95b

Contents?: true

Size: 497 Bytes

Versions: 5

Compression:

Stored size: 497 Bytes

Contents

module Decorum
  module Examples
    class ImmediateDecorator < Decorum::Decorator
      immediate 
      share :immediately_shared

      def method_in_question
        "overridden"
      end
      
      def another_method_in_question
        "overridden"
      end

      def increment_immediately_shared
        self.immediately_shared ||= 0
        self.immediately_shared += 1
        decorated_tail(immediately_shared) { next_link.increment_immediately_shared }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
decorum-0.5.1 examples/immediate_decorator.rb
decorum-0.5.0 examples/immediate_decorator.rb
decorum-0.4.1 examples/immediate_decorator.rb
decorum-0.4.0 examples/immediate_decorator.rb
decorum-0.3.0 examples/immediate_decorator.rb