Class: Corrails::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/corrails/model/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeResponse

Returns a new instance of Response.



5
6
# File 'lib/corrails/model/response.rb', line 5

def initialize
end

Instance Attribute Details

#error_msgObject

Returns the value of attribute error_msg.



3
4
5
# File 'lib/corrails/model/response.rb', line 3

def error_msg
  @error_msg
end

#itemObject

Returns the value of attribute item.



3
4
5
# File 'lib/corrails/model/response.rb', line 3

def item
  @item
end

#resultObject

Returns the value of attribute result.



3
4
5
# File 'lib/corrails/model/response.rb', line 3

def result
  @result
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/corrails/model/response.rb', line 3

def status
  @status
end

Instance Method Details

#ok?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/corrails/model/response.rb', line 8

def ok?
  result == true  
end