Class: FormatParser::Document

Inherits:
Object
  • Object
show all
Includes:
AttributesJSON
Defined in:
lib/document.rb

Constant Summary collapse

NATURE =
:document

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AttributesJSON

#as_json, #to_json

Constructor Details

#initialize(**attributes) ⇒ Document

Only permits assignments via defined accessors



12
13
14
# File 'lib/document.rb', line 12

def initialize(**attributes)
  attributes.map { |(k, v)| public_send("#{k}=", v) }
end

Instance Attribute Details

#document_typeObject

Returns the value of attribute document_type.



8
9
10
# File 'lib/document.rb', line 8

def document_type
  @document_type
end

#formatObject

Returns the value of attribute format.



7
8
9
# File 'lib/document.rb', line 7

def format
  @format
end

#page_countObject

Returns the value of attribute page_count.



9
10
11
# File 'lib/document.rb', line 9

def page_count
  @page_count
end

Instance Method Details

#natureObject



16
17
18
# File 'lib/document.rb', line 16

def nature
  NATURE
end