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