Class: Espago::BackRequest
- Inherits:
-
Object
- Object
- Espago::BackRequest
show all
- Defined in:
- lib/espago/back_request.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
8
9
10
|
# File 'lib/espago/back_request.rb', line 8
def initialize(params)
@params = parse(params)
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(attribute_name) ⇒ Object
12
13
14
|
# File 'lib/espago/back_request.rb', line 12
def method_missing(attribute_name)
params[attribute_name.to_s]
end
|
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
6
7
8
|
# File 'lib/espago/back_request.rb', line 6
def params
@params
end
|
Instance Method Details
#card ⇒ Object
16
17
18
|
# File 'lib/espago/back_request.rb', line 16
def card
params["card"] || {}
end
|
#created_at ⇒ Object
20
21
22
|
# File 'lib/espago/back_request.rb', line 20
def created_at
Time.at(params["created_at"].to_i) rescue nil
end
|