Class: Dogtag::Response
- Inherits:
-
Object
- Object
- Dogtag::Response
- Defined in:
- lib/dogtag/response.rb
Constant Summary collapse
- START_SEQUENCE_INDEX =
0
- END_SEQUENCE_INDEX =
1
- LOGICAL_SHARD_ID_INDEX =
2
- SECONDS_INDEX =
3
- MICROSECONDS_INDEX =
4
Instance Method Summary collapse
- #end_sequence ⇒ Object
-
#initialize(redis_response) ⇒ Response
constructor
A new instance of Response.
- #logical_shard_id ⇒ Object
- #microseconds_part ⇒ Object
- #seconds ⇒ Object
- #sequence ⇒ Object
- #start_sequence ⇒ Object
Constructor Details
#initialize(redis_response) ⇒ Response
Returns a new instance of Response.
9 10 11 |
# File 'lib/dogtag/response.rb', line 9 def initialize(redis_response) @redis_response = redis_response end |
Instance Method Details
#end_sequence ⇒ Object
21 22 23 |
# File 'lib/dogtag/response.rb', line 21 def end_sequence redis_response[END_SEQUENCE_INDEX] end |
#logical_shard_id ⇒ Object
25 26 27 |
# File 'lib/dogtag/response.rb', line 25 def logical_shard_id redis_response[LOGICAL_SHARD_ID_INDEX] end |
#microseconds_part ⇒ Object
33 34 35 |
# File 'lib/dogtag/response.rb', line 33 def microseconds_part redis_response[MICROSECONDS_INDEX] end |
#seconds ⇒ Object
29 30 31 |
# File 'lib/dogtag/response.rb', line 29 def seconds redis_response[SECONDS_INDEX] end |
#sequence ⇒ Object
13 14 15 |
# File 'lib/dogtag/response.rb', line 13 def sequence start_sequence..end_sequence end |
#start_sequence ⇒ Object
17 18 19 |
# File 'lib/dogtag/response.rb', line 17 def start_sequence redis_response[START_SEQUENCE_INDEX] end |