Class: Egree::Client::SuccessResult

Inherits:
Object
  • Object
show all
Defined in:
lib/egree/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ SuccessResult

Returns a new instance of SuccessResult.



77
78
79
# File 'lib/egree/client.rb', line 77

def initialize response
  @raw = response
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



75
76
77
# File 'lib/egree/client.rb', line 75

def raw
  @raw
end

Instance Method Details

#responseObject



81
82
83
84
85
86
87
# File 'lib/egree/client.rb', line 81

def response
  begin
    JSON.parse raw
  rescue JSON::ParserError
    raw
  end
end

#success?Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/egree/client.rb', line 89

def success?
  true
end