Class: Retab::EditRequest
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::EditRequest
- Defined in:
- lib/retab/edits/edit_request.rb
Constant Summary collapse
- HASH_ATTRS =
{ instructions: :instructions, document: :document, template_id: :template_id, model: :model, config: :config, bust_cache: :bust_cache }.freeze
Instance Attribute Summary collapse
-
#bust_cache ⇒ Object
Returns the value of attribute bust_cache.
-
#config ⇒ Object
Returns the value of attribute config.
-
#document ⇒ Object
Returns the value of attribute document.
-
#instructions ⇒ Object
Returns the value of attribute instructions.
-
#model ⇒ Object
Returns the value of attribute model.
-
#template_id ⇒ Object
Returns the value of attribute template_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ EditRequest
constructor
A new instance of EditRequest.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ EditRequest
Returns a new instance of EditRequest.
25 26 27 28 29 30 31 32 33 |
# File 'lib/retab/edits/edit_request.rb', line 25 def initialize(json) hash = self.class.normalize(json) @instructions = hash[:instructions] @document = hash[:document] ? Retab::MimeData.new(hash[:document]) : nil @template_id = hash[:template_id] @model = hash[:model] @config = hash[:config] ? Retab::EditConfig.new(hash[:config]) : nil @bust_cache = hash[:bust_cache] end |
Instance Attribute Details
#bust_cache ⇒ Object
Returns the value of attribute bust_cache.
17 18 19 |
# File 'lib/retab/edits/edit_request.rb', line 17 def bust_cache @bust_cache end |
#config ⇒ Object
Returns the value of attribute config.
17 18 19 |
# File 'lib/retab/edits/edit_request.rb', line 17 def config @config end |
#document ⇒ Object
Returns the value of attribute document.
17 18 19 |
# File 'lib/retab/edits/edit_request.rb', line 17 def document @document end |
#instructions ⇒ Object
Returns the value of attribute instructions.
17 18 19 |
# File 'lib/retab/edits/edit_request.rb', line 17 def instructions @instructions end |
#model ⇒ Object
Returns the value of attribute model.
17 18 19 |
# File 'lib/retab/edits/edit_request.rb', line 17 def model @model end |
#template_id ⇒ Object
Returns the value of attribute template_id.
17 18 19 |
# File 'lib/retab/edits/edit_request.rb', line 17 def template_id @template_id end |