Class: Rafflesia::SearchSegmentBlock
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::SearchSegmentBlock
- Defined in:
- lib/rafflesia/proteins/search_segment_block.rb
Constant Summary collapse
- HASH_ATTRS =
{ block_index: :block_index, end_key: :end_key, object: :object, range_length_bytes: :range_length_bytes, range_offset_bytes: :range_offset_bytes, sha256: :sha_256, size_bytes: :size_bytes, start_key: :start_key }.freeze
Instance Attribute Summary collapse
-
#block_index ⇒ Object
Returns the value of attribute block_index.
-
#end_key ⇒ Object
Returns the value of attribute end_key.
-
#object ⇒ Object
Returns the value of attribute object.
-
#range_length_bytes ⇒ Object
Returns the value of attribute range_length_bytes.
-
#range_offset_bytes ⇒ Object
Returns the value of attribute range_offset_bytes.
-
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
-
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
-
#start_key ⇒ Object
Returns the value of attribute start_key.
Instance Method Summary collapse
-
#initialize(json) ⇒ SearchSegmentBlock
constructor
A new instance of SearchSegmentBlock.
Constructor Details
#initialize(json) ⇒ SearchSegmentBlock
Returns a new instance of SearchSegmentBlock.
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 29 def initialize(json) super() hash = self.class.normalize(json) @block_index = hash[:block_index] @end_key = hash[:end_key] @object = hash[:object] ? Rafflesia::ObjectRef.new(hash[:object]) : nil @range_length_bytes = hash[:range_length_bytes] @range_offset_bytes = hash[:range_offset_bytes] @sha_256 = hash[:sha256] @size_bytes = hash[:size_bytes] @start_key = hash[:start_key] end |
Instance Attribute Details
#block_index ⇒ Object
Returns the value of attribute block_index.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def block_index @block_index end |
#end_key ⇒ Object
Returns the value of attribute end_key.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def end_key @end_key end |
#object ⇒ Object
Returns the value of attribute object.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def object @object end |
#range_length_bytes ⇒ Object
Returns the value of attribute range_length_bytes.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def range_length_bytes @range_length_bytes end |
#range_offset_bytes ⇒ Object
Returns the value of attribute range_offset_bytes.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def range_offset_bytes @range_offset_bytes end |
#sha_256 ⇒ Object
Returns the value of attribute sha_256.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def sha_256 @sha_256 end |
#size_bytes ⇒ Object
Returns the value of attribute size_bytes.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def size_bytes @size_bytes end |
#start_key ⇒ Object
Returns the value of attribute start_key.
19 20 21 |
# File 'lib/rafflesia/proteins/search_segment_block.rb', line 19 def start_key @start_key end |