Sha256: 4868a632d3af432100691b93fa530854c5d5f92b86940a7441deb8f0242cb651
Contents?: true
Size: 553 Bytes
Versions: 1
Compression:
Stored size: 553 Bytes
Contents
module ApiNavigator # Public: A wrapper class to easily acces the attributes in a Resource. # # Examples # # resource.attributes['title'] # resource.attributes.title # class Attributes < CollectionHash # Public: Initializes the Attributes of a Resource. # # representation - The hash with the HAL representation of the Resource. # def initialize(attributes_hash) raise ArgumentError, "argument nust be a Hash, is #{attributes_hash.class}" unless attributes_hash.kind_of? Hash super end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
api_navigator-0.0.1 | lib/api_navigator/attributes.rb |