Class: Activite::Response

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

Overview

A Response is used to represent an empty API response with a status code and no additional information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Response

Returns a new instance of Response.



9
10
11
# File 'lib/activite/response.rb', line 9

def initialize(attrs = {})
  @status = attrs['status'].to_i if attrs.has_key? 'status'
end

Instance Attribute Details

#statusInteger (readonly)

Returns:

  • (Integer)


7
8
9
# File 'lib/activite/response.rb', line 7

def status
  @status
end