Class: Retab::PartitionChunkLikelihood
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::PartitionChunkLikelihood
- Defined in:
- lib/retab/partitions/partition_chunk_likelihood.rb
Constant Summary collapse
- HASH_ATTRS =
{ key: :key, pages: :pages }.freeze
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#pages ⇒ Object
Returns the value of attribute pages.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ PartitionChunkLikelihood
constructor
A new instance of PartitionChunkLikelihood.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ PartitionChunkLikelihood
Returns a new instance of PartitionChunkLikelihood.
17 18 19 20 21 |
# File 'lib/retab/partitions/partition_chunk_likelihood.rb', line 17 def initialize(json) hash = self.class.normalize(json) @key = hash[:key] @pages = (hash[:pages] || []) end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
13 14 15 |
# File 'lib/retab/partitions/partition_chunk_likelihood.rb', line 13 def key @key end |
#pages ⇒ Object
Returns the value of attribute pages.
13 14 15 |
# File 'lib/retab/partitions/partition_chunk_likelihood.rb', line 13 def pages @pages end |