Class: Howcast::Client::Homepage
- Inherits:
-
Object
- Object
- Howcast::Client::Homepage
- Extended by:
- WatchAttrAccessors
- Includes:
- XmlMethods
- Defined in:
- lib/howcast/client/homepage.rb
Instance Attribute Summary collapse
-
#playlists ⇒ Object
Returns the value of attribute playlists.
-
#videos ⇒ Object
Returns the value of attribute videos.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Homepage
constructor
Creates a new Homepage object which is used to encapsulate all the attributes available from the Howcast homepage API.
Methods included from WatchAttrAccessors
Methods included from XmlMethods
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
#playlists ⇒ Object
Returns the value of attribute playlists.
29 30 31 |
# File 'lib/howcast/client/homepage.rb', line 29 def playlists @playlists end |
#videos ⇒ Object
Returns the value of attribute videos.
29 30 31 |
# File 'lib/howcast/client/homepage.rb', line 29 def videos @videos end |