Class: Radar::MessageList
- Defined in:
- lib/radar_client_rb/resource.rb
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(client, name) ⇒ MessageList
constructor
A new instance of MessageList.
Methods inherited from Resource
Constructor Details
#initialize(client, name) ⇒ MessageList
Returns a new instance of MessageList.
87 88 89 |
# File 'lib/radar_client_rb/resource.rb', line 87 def initialize(client, name) super(client, "message:/#{client.subdomain}/#{name}") end |
Instance Method Details
#get ⇒ Object
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/radar_client_rb/resource.rb', line 91 def get # Unfortunately we can't apply any maxAge policies. result_arr = @client.redis.zrange(@name, -100, -1, :with_scores => true) result = [] result_arr.each do |, time| = JSON.parse(, :quirks_mode => true) result << [, time] end result end |