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-1.7.0 lib/document.rb
format_parser-1.6.0 lib/document.rb
format_parser-1.5.0 lib/document.rb
format_parser-1.4.2 lib/document.rb
format_parser-1.4.1 lib/document.rb
format_parser-1.4.0 lib/document.rb
format_parser-1.3.0 lib/document.rb
format_parser-1.2.1 lib/document.rb
format_parser-1.2.0 lib/document.rb
format_parser-1.1.0 lib/document.rb
format_parser-1.0.0 lib/document.rb
format_parser-0.29.1 lib/document.rb
format_parser-0.29.0 lib/document.rb
format_parser-0.28.0 lib/document.rb
format_parser-0.27.0 lib/document.rb