Class: HAStats::Responses::Text
- Defined in:
- lib/hastats/responses/text.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from HAStats::Responses::Base
Instance Method Details
#parse ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/hastats/responses/text.rb', line 3 def parse self.parsed = {} self.raw.split("\n").each do |line| name, value = line.split(/:/, 2) self.parsed[name.strip.downcase.to_sym] = value.strip if name && value end end |