Sha256: fd7eeab77819d32a0c69f96f47ad48861827b6db26e3e67a2bf6e6755a049cbe

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

# coding: utf-8

module Thinreports
  module Core::Shape

    class List::SectionInternal < Base::Internal
      format_delegators :height,
                        :relative_left,
                        :relative_top,
                        :svg_tag

      # @return [Symbol]
      attr_accessor :section_name

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

      # @param [Numeric] ry
      def move_top_to(ry)
        states[:relative_top] = ry
      end

      # @return [Array<Numeric>]
      def relative_position
        [relative_left,
         relative_top + (states[:relative_top] || 0)]
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
thinreports-0.8.2 lib/thinreports/core/shape/list/section_internal.rb
thinreports-0.8.1 lib/thinreports/core/shape/list/section_internal.rb
thinreports-0.8.0 lib/thinreports/core/shape/list/section_internal.rb