Sha256: cecc0979964e99d5335d051025257482247364dc6b9cfbe979cbea15c5021f5d

Contents?: true

Size: 698 Bytes

Versions: 4

Compression:

Stored size: 698 Bytes

Contents

# coding: utf-8

module ThinReports
  module Core::Shape
    
    # @private
    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

4 entries across 4 versions & 1 rubygems

Version Path
thinreports-0.7.7 lib/thinreports/core/shape/list/section_internal.rb
thinreports-0.7.6 lib/thinreports/core/shape/list/section_internal.rb
thinreports-0.7.5 lib/thinreports/core/shape/list/section_internal.rb
thinreports-0.7.0 lib/thinreports/core/shape/list/section_internal.rb