Class: Enlight::Responses::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Response



9
10
11
12
# File 'lib/enlight/responses/response.rb', line 9

def initialize(attributes={})
  attributes.deep_transform_keys! { |k| k.to_s.underscore }
  attributes.each {|k,v| send("#{k}=", v) if respond_to?(k) }
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



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

def error
  @error
end

#statusObject

Returns the value of attribute status.



6
7
8
# File 'lib/enlight/responses/response.rb', line 6

def status
  @status
end