Class: FormatParser::Document
- Inherits:
-
Object
- Object
- FormatParser::Document
- Includes:
- AttributesJSON
- Defined in:
- lib/document.rb
Constant Summary collapse
- NATURE =
:document
Constants included from AttributesJSON
AttributesJSON::MAXIMUM_JSON_NESTING_WHEN_SANITIZING
Instance Attribute Summary collapse
-
#content_type ⇒ Object
Returns the value of attribute content_type.
-
#document_type ⇒ Object
Returns the value of attribute document_type.
-
#format ⇒ Object
Returns the value of attribute format.
-
#page_count ⇒ Object
Returns the value of attribute page_count.
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ Document
constructor
Only permits assignments via defined accessors.
- #nature ⇒ Object
Methods included from AttributesJSON
_sanitize_json_value, #as_json, #to_json
Constructor Details
#initialize(**attributes) ⇒ Document
Only permits assignments via defined accessors
13 14 15 |
# File 'lib/document.rb', line 13 def initialize(**attributes) attributes.map { |(k, v)| public_send("#{k}=", v) } end |
Instance Attribute Details
#content_type ⇒ Object
Returns the value of attribute content_type.
10 11 12 |
# File 'lib/document.rb', line 10 def content_type @content_type end |
#document_type ⇒ Object
Returns the value of attribute document_type.
8 9 10 |
# File 'lib/document.rb', line 8 def document_type @document_type end |
#format ⇒ Object
Returns the value of attribute format.
7 8 9 |
# File 'lib/document.rb', line 7 def format @format end |
#page_count ⇒ Object
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
#nature ⇒ Object
17 18 19 |
# File 'lib/document.rb', line 17 def nature NATURE end |