Module: Bitly::API::Base
- Included in:
- Bitlink, Bitly::API::Bitlink::ClicksSummary, Bitly::API::Bitlink::Deeplink, Bitly::API::Bitlink::LinkClick, ClickMetric, Group, Group::Preferences, Organization, ShortenCounts, User
- Defined in:
- lib/bitly/api/base.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
7 8 9 |
# File 'lib/bitly/api/base.rb', line 7 def response @response end |
Instance Method Details
#assign_attributes(attributes) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/bitly/api/base.rb', line 9 def assign_attributes(attributes) if self.class.respond_to?(:attributes) self.class.attributes.each do |attr| instance_variable_set("@#{attr}", attributes[attr.to_s]) if attributes[attr.to_s] end end if self.class.respond_to?(:time_attributes) self.class.time_attributes.each do |attr| instance_variable_set("@#{attr}", Time.parse(attributes[attr.to_s])) if attributes[attr.to_s] end end end |