Sha256: 7b48b45bff2da83e9d4084bdf03ea925dc881b5dccfd713762349abbada86555

Contents?: true

Size: 600 Bytes

Versions: 7

Compression:

Stored size: 600 Bytes

Contents

# frozen_string_literal: true

module Thinreports
  module Core
    module Shape
      module Manager
        class Format < Core::Format::Base
          # @return [Symbol, Integer]
          attr_reader :identifier

          def initialize(config, id = nil, &block)
            super(config, &block)
            @identifier = id || object_id
          end

          def find_shape(id)
            shapes[id]
          end

          def has_shape?(id)
            shapes.key?(id)
          end

          def shapes
            @shapes ||= {}
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
thinreports-0.12.1 lib/thinreports/core/shape/manager/format.rb
thinreports-0.12.0 lib/thinreports/core/shape/manager/format.rb
thinreports-0.11.0 lib/thinreports/core/shape/manager/format.rb
thinreports-0.10.3 lib/thinreports/core/shape/manager/format.rb
thinreports-0.10.2 lib/thinreports/core/shape/manager/format.rb
thinreports-0.10.1 lib/thinreports/core/shape/manager/format.rb
thinreports-0.10.0 lib/thinreports/core/shape/manager/format.rb