Class: Giphy::SpecialGif
- Inherits:
-
Object
- Object
- Giphy::SpecialGif
- Defined in:
- lib/giphy/special_gif.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
- #create_date ⇒ Object
- #gif_id ⇒ Object
-
#initialize(hash) ⇒ SpecialGif
constructor
A new instance of SpecialGif.
Constructor Details
#initialize(hash) ⇒ SpecialGif
Returns a new instance of SpecialGif.
9 10 11 |
# File 'lib/giphy/special_gif.rb', line 9 def initialize(hash) @hash = hash end |
Class Method Details
.build_batch_from(array) ⇒ Object
5 6 7 |
# File 'lib/giphy/special_gif.rb', line 5 def self.build_batch_from(array) array.map { |special_gif| new(special_gif)} end |
Instance Method Details
#create_date ⇒ Object
13 14 15 |
# File 'lib/giphy/special_gif.rb', line 13 def create_date DateTime.parse(hash.fetch('create_date')) end |
#gif_id ⇒ Object
17 18 19 |
# File 'lib/giphy/special_gif.rb', line 17 def gif_id hash.fetch('gif_id') end |