class Giphy::Artist

Attributes

hash[R]

Public Class Methods

build_batch_from(array) click to toggle source
# File lib/giphy/artist.rb, line 3
def self.build_batch_from(array)
  array.map { |artist| new(artist) }
end
new(hash) click to toggle source
# File lib/giphy/artist.rb, line 7
def initialize(hash)
  @hash = hash
end

Public Instance Methods

avatar() click to toggle source
# File lib/giphy/artist.rb, line 15
def avatar
  URI(hash.fetch('avatar'))
end
count() click to toggle source
# File lib/giphy/artist.rb, line 27
def count
  hash.fetch('count').to_i
end
name() click to toggle source
# File lib/giphy/artist.rb, line 23
def name
  hash.fetch('name')
end
username() click to toggle source
# File lib/giphy/artist.rb, line 11
def username
  hash.fetch('username')
end
website() click to toggle source
# File lib/giphy/artist.rb, line 19
def website
  URI(hash.fetch('website'))
end