Sha256: 8c0be39dbb0c75160f539f3d5b01bc78df976db727f0a49560a32fb9a8771af6

Contents?: true

Size: 666 Bytes

Versions: 7

Compression:

Stored size: 666 Bytes

Contents

# frozen_string_literal: true

module Thinreports
  module Core
    module Shape
      module Basic
        class BlockInternal < Basic::Internal
          format_delegators :box

          def style
            @style ||= Style::Basic.new(format)
          end

          def read_value
            states.key?(:value) ? states[:value] : format.value.dup
          end
          alias value read_value

          def write_value(val)
            states[:value] = val
          end

          def real_value
            read_value
          end

          def type_of?(type_name)
            type_name == :block
          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/basic/block_internal.rb
thinreports-0.12.0 lib/thinreports/core/shape/basic/block_internal.rb
thinreports-0.11.0 lib/thinreports/core/shape/basic/block_internal.rb
thinreports-0.10.3 lib/thinreports/core/shape/basic/block_internal.rb
thinreports-0.10.2 lib/thinreports/core/shape/basic/block_internal.rb
thinreports-0.10.1 lib/thinreports/core/shape/basic/block_internal.rb
thinreports-0.10.0 lib/thinreports/core/shape/basic/block_internal.rb