Class: PetfinderV2::Serializers::Photos
- Inherits:
-
Object
- Object
- PetfinderV2::Serializers::Photos
- Defined in:
- lib/petfinder_V2/serializers/photos.rb
Instance Attribute Summary collapse
-
#full ⇒ Object
readonly
Returns the value of attribute full.
-
#large ⇒ Object
readonly
Returns the value of attribute large.
-
#medium ⇒ Object
readonly
Returns the value of attribute medium.
-
#small ⇒ Object
readonly
Returns the value of attribute small.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Photos
constructor
A new instance of Photos.
Constructor Details
#initialize(data) ⇒ Photos
9 10 11 12 13 14 |
# File 'lib/petfinder_V2/serializers/photos.rb', line 9 def initialize(data) @small = data['small'] @medium = data['medium'] @large = data['large'] @full = data['full'] end |
Instance Attribute Details
#full ⇒ Object (readonly)
Returns the value of attribute full.
8 9 10 |
# File 'lib/petfinder_V2/serializers/photos.rb', line 8 def full @full end |
#large ⇒ Object (readonly)
Returns the value of attribute large.
8 9 10 |
# File 'lib/petfinder_V2/serializers/photos.rb', line 8 def large @large end |
#medium ⇒ Object (readonly)
Returns the value of attribute medium.
8 9 10 |
# File 'lib/petfinder_V2/serializers/photos.rb', line 8 def medium @medium end |
#small ⇒ Object (readonly)
Returns the value of attribute small.
8 9 10 |
# File 'lib/petfinder_V2/serializers/photos.rb', line 8 def small @small end |
Class Method Details
.process_collection(collection) ⇒ Object
4 5 6 |
# File 'lib/petfinder_V2/serializers/photos.rb', line 4 def self.process_collection(collection) collection.inject([]) { |mem, photos_hash| mem << new(photos_hash) } end |