Class: Gateway::Requests::CommonRequest
- Inherits:
-
Object
- Object
- Gateway::Requests::CommonRequest
- Defined in:
- lib/gateway/requests/common_request.rb
Overview
Common request All request is needed to inheritance from it
Direct Known Subclasses
Client, InboxMessageRequest, SendMessageRequest, SetProfileRequest, WidgetMessageRequest
Instance Method Summary collapse
-
#attributes ⇒ Hash
Convert instance variables to hash.
Instance Method Details
#attributes ⇒ Hash
Convert instance variables to hash
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/gateway/requests/common_request.rb', line 15 def attributes hash = {} instance_variables.each do |attr| value = instance_variable_get attr if value.is_a? Gateway::Requests::CommonRequest hash[attr[1..-1]] = value.attributes else hash[attr[1..-1]] = value end end hash end |