class Giphy::Image
Attributes
hash[R]
Public Class Methods
new(hash)
click to toggle source
# File lib/giphy/image.rb, line 3 def initialize(hash) @hash = hash end
Public Instance Methods
frames()
click to toggle source
# File lib/giphy/image.rb, line 23 def frames hash.fetch('frames', 0).to_i end
height()
click to toggle source
# File lib/giphy/image.rb, line 15 def height hash.fetch('height').to_i end
size()
click to toggle source
# File lib/giphy/image.rb, line 19 def size hash.fetch('size', 0).to_i end
url()
click to toggle source
# File lib/giphy/image.rb, line 7 def url URI(hash.fetch('url')) end
width()
click to toggle source
# File lib/giphy/image.rb, line 11 def width hash.fetch('width').to_i end