Sha256: 14fb3384c00e3d87b344bc89410f195f45ca97019a85b28c4d7c5f3130f932c8

Contents?: true

Size: 743 Bytes

Versions: 5

Compression:

Stored size: 743 Bytes

Contents

# frozen_string_literal: true

module Thinreports
  module BasicReport
    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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thinreports-0.14.2 lib/thinreports/basic_report/core/shape/basic/block_internal.rb
thinreports-0.14.1 lib/thinreports/basic_report/core/shape/basic/block_internal.rb
thinreports-0.14.0 lib/thinreports/basic_report/core/shape/basic/block_internal.rb
thinreports-0.13.1 lib/thinreports/basic_report/core/shape/basic/block_internal.rb
thinreports-0.13.0 lib/thinreports/basic_report/core/shape/basic/block_internal.rb