lib/submodules/ably-ruby/lib/ably/models/error_info.rb in ably-rest-0.8.6 vs lib/submodules/ably-ruby/lib/ably/models/error_info.rb in ably-rest-0.8.9
- old
+ new
@@ -6,11 +6,11 @@
# @return [String] Additional reason information, where available
# @!attribute [r] code
# @return [Integer] Ably error code (see ably-common/protocol/errors.json)
# @!attribute [r] status
# @return [Integer] HTTP Status Code corresponding to this error, where applicable
- # @!attribute [r] hash
+ # @!attribute [r] attributes
# @return [Hash] Access the protocol message Hash object ruby'fied to use symbolized keys
#
class ErrorInfo
include Ably::Modules::ModelCommon
@@ -19,15 +19,15 @@
@hash_object = IdiomaticRubyWrapper(hash_object.clone.freeze)
end
%w(message code status_code).each do |attribute|
define_method attribute do
- hash[attribute.to_sym]
+ attributes[attribute.to_sym]
end
end
alias_method :status, :status_code
- def hash
+ def attributes
@hash_object
end
def to_s
"Error: #{message} (code: #{code}, http status: #{status})"