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