Class: RedisProtocol::Request
- Inherits:
-
Object
- Object
- RedisProtocol::Request
- Defined in:
- lib/redis-protocol/request.rb
Instance Attribute Summary collapse
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #component_count ⇒ Object
-
#initialize(data) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(data) ⇒ Request
Returns a new instance of Request.
6 7 8 9 10 11 |
# File 'lib/redis-protocol/request.rb', line 6 def initialize(data) @raw_data = data @type, @components= nil, [] @next_length = 0 parse end |
Instance Attribute Details
#components ⇒ Object (readonly)
Returns the value of attribute components.
4 5 6 |
# File 'lib/redis-protocol/request.rb', line 4 def components @components end |
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
4 5 6 |
# File 'lib/redis-protocol/request.rb', line 4 def raw_data @raw_data end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/redis-protocol/request.rb', line 4 def type @type end |
Instance Method Details
#component_count ⇒ Object
13 14 15 |
# File 'lib/redis-protocol/request.rb', line 13 def component_count @components.length end |