Class: Redu::RedisDebugObject
- Inherits:
-
Object
- Object
- Redu::RedisDebugObject
- Defined in:
- lib/redu/analyzer.rb
Instance Attribute Summary collapse
-
#bytesize ⇒ Object
“Value at:0x7f93e48464e0 refcount:1 encoding:raw serializedlength:230 lru:710236 lru_seconds_idle:2040”.
-
#key ⇒ Object
“Value at:0x7f93e48464e0 refcount:1 encoding:raw serializedlength:230 lru:710236 lru_seconds_idle:2040”.
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(key, string) ⇒ RedisDebugObject
constructor
A new instance of RedisDebugObject.
- #inspect ⇒ Object
Constructor Details
#initialize(key, string) ⇒ RedisDebugObject
Returns a new instance of RedisDebugObject.
68 69 70 71 72 73 74 75 |
# File 'lib/redu/analyzer.rb', line 68 def initialize(key,string) @key = key if string =~ /serializedlength:(\d+)/ @bytesize = $1.to_i else raise "Invalid matching for #{string}" end end |
Instance Attribute Details
#bytesize ⇒ Object
“Value at:0x7f93e48464e0 refcount:1 encoding:raw serializedlength:230 lru:710236 lru_seconds_idle:2040”
62 63 64 |
# File 'lib/redu/analyzer.rb', line 62 def bytesize @bytesize end |
#key ⇒ Object
“Value at:0x7f93e48464e0 refcount:1 encoding:raw serializedlength:230 lru:710236 lru_seconds_idle:2040”
62 63 64 |
# File 'lib/redu/analyzer.rb', line 62 def key @key end |
Class Method Details
.initialize_from_string(key, string) ⇒ Object
64 65 66 |
# File 'lib/redu/analyzer.rb', line 64 def self.initialize_from_string(key,string) RedisDebugObject.new(key,string) end |
Instance Method Details
#<=>(other) ⇒ Object
81 82 83 |
# File 'lib/redu/analyzer.rb', line 81 def <=>(other) self.bytesize <=> other.bytesize end |
#inspect ⇒ Object
77 78 79 |
# File 'lib/redu/analyzer.rb', line 77 def inspect "rdo:(#{@key},#{@bytesize})" end |