Class: Howcast::Client::Homepage

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from WatchAttrAccessors

attr_accessor, attr_accessors

Methods included from XmlMethods

#to_doc, #to_xml

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]


42
43
44
45
46
# File 'lib/howcast/client/homepage.rb', line 42

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.



29
30
31
# File 'lib/howcast/client/homepage.rb', line 29

def playlists
  @playlists
end

#videosObject

Returns the value of attribute videos.



29
30
31
# File 'lib/howcast/client/homepage.rb', line 29

def videos
  @videos
end