Class: HAStats::Responses::BlankResult

Inherits:
Base
  • Object
show all
Defined in:
lib/hastats/responses/blank_result.rb

Instance Attribute Summary

Attributes inherited from Base

#parsed, #raw

Instance Method Summary collapse

Methods inherited from Base

#initialize, #to_json

Constructor Details

This class inherits a constructor from HAStats::Responses::Base

Instance Method Details

#parseObject



3
4
5
6
7
8
9
# File 'lib/hastats/responses/blank_result.rb', line 3

def parse
  if self.raw.strip.empty?
    self.parsed = { :success => true }
  else
    self.parsed = { :success => false, :message => self.raw.strip }
  end
end