Class: OJAD::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/ojad/result.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Result

Returns a new instance of Result.



7
8
9
# File 'lib/ojad/result.rb', line 7

def initialize(response)
  @response = response
end

Instance Method Details

#to_humanObject



11
12
13
14
15
16
17
# File 'lib/ojad/result.rb', line 11

def to_human
  if response.success?
    verbs_for_human
  else
    error_message
  end
end