Sha256: a531ff9206319355e7b02f51aba51c11d61dd3ee31131ac84d6d030652e79846

Contents?: true

Size: 392 Bytes

Versions: 51

Compression:

Stored size: 392 Bytes

Contents

module FormatParser
  class Document
    include FormatParser::AttributesJSON

    NATURE = :document

    attr_accessor :format
    attr_accessor :document_type
    attr_accessor :page_count

    # Only permits assignments via defined accessors
    def initialize(**attributes)
      attributes.map { |(k, v)| public_send("#{k}=", v) }
    end

    def nature
      NATURE
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
format_parser-0.26.0 lib/document.rb
format_parser-0.25.6 lib/document.rb
format_parser-0.25.5 lib/document.rb
format_parser-0.25.4 lib/document.rb
format_parser-0.25.3 lib/document.rb
format_parser-0.25.2 lib/document.rb
format_parser-0.25.1 lib/document.rb
format_parser-0.25.0 lib/document.rb
format_parser-0.24.2 lib/document.rb
format_parser-0.24.1 lib/document.rb
format_parser-0.24.0 lib/document.rb
format_parser-0.23.1 lib/document.rb
format_parser-0.23.0 lib/document.rb
format_parser-0.22.1 lib/document.rb
format_parser-0.22.0 lib/document.rb
format_parser-0.21.1 lib/document.rb
format_parser-0.21.0 lib/document.rb
format_parser-0.20.1 lib/document.rb
format_parser-0.20.0 lib/document.rb
format_parser-0.19.0 lib/document.rb