Class: Retab::PartitionChunkLikelihood

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/partitions/partition_chunk_likelihood.rb

Constant Summary collapse

HASH_ATTRS =
{
  key: :key,
  pages: :pages
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

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

#keyObject

Returns the value of attribute key.



13
14
15
# File 'lib/retab/partitions/partition_chunk_likelihood.rb', line 13

def key
  @key
end

#pagesObject

Returns the value of attribute pages.



13
14
15
# File 'lib/retab/partitions/partition_chunk_likelihood.rb', line 13

def pages
  @pages
end