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