Sha256: 7e3694d1a2c018298addf322524e0fa5c5faff51337e875ab5ef9c46a7f31769

Contents?: true

Size: 881 Bytes

Versions: 7

Compression:

Stored size: 881 Bytes

Contents

# frozen_string_literal: true

module Thinreports
  module SectionReport
    module Schema
      class Report < Core::Shape::Manager::Format
        config_reader last_version: %w( version )
        config_reader report_title: %w( title )
        config_reader page_paper_type: %w( report paper-type ),
                      page_orientation: %w( report orientation ),
                      page_margin: %w( report margin ),
                      page_width: %w[report width],
                      page_height: %w[report height]

        attr_reader :headers, :details, :footers

        def user_paper_type?
          page_paper_type == 'user'
        end

        def initialize(schema_data, headers:, details:, footers:)
          super(schema_data)
          @headers = headers
          @details = details
          @footers = footers
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
thinreports-0.14.2 lib/thinreports/section_report/schema/report.rb
thinreports-0.14.1 lib/thinreports/section_report/schema/report.rb
thinreports-0.14.0 lib/thinreports/section_report/schema/report.rb
thinreports-0.13.1 lib/thinreports/section_report/schema/report.rb
thinreports-0.13.0 lib/thinreports/section_report/schema/report.rb
thinreports-0.12.1 lib/thinreports/section_report/schema/report.rb
thinreports-0.12.0 lib/thinreports/section_report/schema/report.rb