lib/submodules/ably-ruby/lib/ably/models/auth_details.rb in ably-rest-1.2.2 vs lib/submodules/ably-ruby/lib/ably/models/auth_details.rb in ably-rest-1.2.3
- old
+ new
@@ -2,10 +2,11 @@
# Convert auth details attributes to a {AuthDetails} object
#
# @param attributes (see #initialize)
#
# @return [AuthDetails]
+ #
def self.AuthDetails(attributes)
case attributes
when AuthDetails
return attributes
else
@@ -25,17 +26,19 @@
def initialize(attributes = {})
@hash_object = IdiomaticRubyWrapper(attributes.clone)
self.attributes.freeze
end
- %w(access_token).each do |attribute|
- define_method attribute do
- attributes[attribute.to_sym]
- end
+ # The authentication token string.
+ #
+ # @spec AD2
+ #
+ # @return [String]
+ #
+ def access_token
+ attributes[:access_token]
end
- # @!attribute [r] attributes
- # @return [Hash] Access the token details Hash object ruby'fied to use symbolized keys
def attributes
@hash_object
end
end
end