Class: Howcast::Client::Homepage

Inherits:
Object
  • Object
show all
Extended by:
WatchAttrAccessors
Defined in:
lib/howcast/client/homepage.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WatchAttrAccessors

attr_accessor, attr_accessors

Constructor Details

#initialize(attributes = {}) ⇒ Homepage

Creates a new Homepage object which is used to encapsulate all the attributes available from the Howcast homepage API.

Inputs

  • attributes – A hash to set the various attributes of the homepage object

Examples

Initialize a user with an array of videos

Homepage.new :videos => [video1, video2]


40
41
42
43
44
# File 'lib/howcast/client/homepage.rb', line 40

def initialize(attributes={})
  attributes.each do |k, v|
    self.send("#{k}=", v) if self.respond_to?(k)
  end
end

Instance Attribute Details

#playlistsObject

Returns the value of attribute playlists.



27
28
29
# File 'lib/howcast/client/homepage.rb', line 27

def playlists
  @playlists
end

#videosObject

Returns the value of attribute videos.



27
28
29
# File 'lib/howcast/client/homepage.rb', line 27

def videos
  @videos
end