class Roma::Client::Stats
TODO: Implement accessors and return values with correct type Now: client.stats #=> “2” Better: client.stats.routing.redundant #=> 2
Public Class Methods
new(stats_str)
click to toggle source
# File lib/roma/client/stats.rb 7 def initialize(stats_str) 8 stats_str.each_line do |line| 9 line =~ /^(.+?)\s(.+)/ 10 key = Regexp.last_match(1) 11 value = Regexp.last_match(2).chomp 12 self[key] = value 13 end 14 end