Sha256: cbe72c62fb3ccbac4d5b85fb00898f45b06d7586cf4ee3359086841a02b41ab0

Contents?: true

Size: 941 Bytes

Versions: 5

Compression:

Stored size: 941 Bytes

Contents

# coding: utf-8

module ThinReports
  module Core::Shape
    
    # @private
    # @abstract
    class Base::Interface
      extend ::Forwardable
      
      def self.internal_delegators(*args)
        def_delegators :internal, *args
      end
      private_class_method :internal_delegators
      
      attr_reader :internal
      
      def initialize(parent, format, internal = nil)
        @internal = internal || init_internal(parent, format)
      end
      
      def copy(parent)
        self.class.new(parent, internal.format, internal.copy(parent))
      end
      
    private
    
      # @param [ThinReports::Core::Page, ThinReports::Core::Shape::List::SectionInterface] parent
      # @param [ThinReports::Core::Shape::Basic::Format] format
      # @return [ThinReports::Core::Shape::Basic::Internal]
      # @abstract
      def init_internal(parent, format)
        raise NotImplementedError
      end
    end
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thinreports-0.7.7 lib/thinreports/core/shape/base/interface.rb
thinreports-0.7.6 lib/thinreports/core/shape/base/interface.rb
thinreports-0.7.5 lib/thinreports/core/shape/base/interface.rb
thinreports-0.7.0 lib/thinreports/core/shape/base/interface.rb
thinreports-0.6.0.pre3 lib/thinreports/core/shape/base/interface.rb