Sha256: 57e9e4f66fa9fc81108a17328f0fecb33408a9cf89bdcc633421365c8311cd28

Contents?: true

Size: 424 Bytes

Versions: 35

Compression:

Stored size: 424 Bytes

Contents

module FormatParser
  class Document
    include FormatParser::AttributesJSON

    NATURE = :document

    attr_accessor :format
    attr_accessor :document_type
    attr_accessor :page_count
    attr_accessor :content_type

    # 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

35 entries across 35 versions & 1 rubygems

Version Path
format_parser-2.10.0 lib/document.rb
format_parser-2.9.0 lib/document.rb
format_parser-2.8.0 lib/document.rb
format_parser-2.7.2 lib/document.rb
format_parser-2.7.1 lib/document.rb
format_parser-2.7.0 lib/document.rb
format_parser-2.6.0 lib/document.rb
format_parser-2.5.0 lib/document.rb
format_parser-2.4.5 lib/document.rb
format_parser-2.4.4 lib/document.rb
format_parser-2.4.3 lib/document.rb
format_parser-2.3.0 lib/document.rb
format_parser-2.2.1 lib/document.rb
format_parser-2.2.0 lib/document.rb
format_parser-2.1.0 lib/document.rb
format_parser-2.0.0 lib/document.rb
format_parser-2.0.0.pre.4 lib/document.rb
format_parser-2.0.0.pre.3 lib/document.rb
format_parser-2.0.0.pre.2 lib/document.rb
format_parser-2.0.0.pre lib/document.rb