Sha256: 3df3759b5873c01bef2f8071e503e3028e44f32f1ba6a83333aee0156682e700

Contents?: true

Size: 594 Bytes

Versions: 5

Compression:

Stored size: 594 Bytes

Contents

# coding: utf-8

module ThinReports
  module Core::Shape
    
    class List::Store < ::Struct
      # @private
      def self.init(attrs)
        new(attrs).new
      end
      
      # @private
      def self.new(attrs)
        super(*attrs.keys) do
          @default_values = attrs.values
          
          def self.default_values
            @default_values.simple_deep_copy
          end
        end
      end
      
      def initialize
        super(*self.class.default_values)
      end
      
      # @private
      def copy
        self.class.new
      end
    end
    
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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