Class: Howcast::Client::User
- Inherits:
-
Object
- Object
- Howcast::Client::User
- Extended by:
- WatchAttrAccessors
- Includes:
- XmlMethods
- Defined in:
- lib/howcast/client/user.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#firstname ⇒ Object
Returns the value of attribute firstname.
-
#lastname ⇒ Object
Returns the value of attribute lastname.
-
#login ⇒ Object
Returns the value of attribute login.
-
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
-
#videos ⇒ Object
Returns the value of attribute videos.
-
#views ⇒ Object
Returns the value of attribute views.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ User
constructor
Creates a new User object which is used to encapsulate all the attributes available from the Howcast user profile API.
Methods included from WatchAttrAccessors
Methods included from XmlMethods
Constructor Details
#initialize(attributes = {}) ⇒ User
Creates a new User object which is used to encapsulate all the attributes available from the Howcast user profile API.
Inputs
-
attributes
– A hash to set the various attributes of the user object
Examples
Initialize a user with login “someone”
User.new :login => "someone"
42 43 44 45 46 |
# File 'lib/howcast/client/user.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
#count ⇒ Object
Returns the value of attribute count.
29 30 31 |
# File 'lib/howcast/client/user.rb', line 29 def count @count end |
#firstname ⇒ Object
Returns the value of attribute firstname.
29 30 31 |
# File 'lib/howcast/client/user.rb', line 29 def firstname @firstname end |
#lastname ⇒ Object
Returns the value of attribute lastname.
29 30 31 |
# File 'lib/howcast/client/user.rb', line 29 def lastname @lastname end |
#login ⇒ Object
Returns the value of attribute login.
29 30 31 |
# File 'lib/howcast/client/user.rb', line 29 def login @login end |
#thumbnail_url ⇒ Object
Returns the value of attribute thumbnail_url.
29 30 31 |
# File 'lib/howcast/client/user.rb', line 29 def thumbnail_url @thumbnail_url end |
#videos ⇒ Object
Returns the value of attribute videos.
29 30 31 |
# File 'lib/howcast/client/user.rb', line 29 def videos @videos end |
#views ⇒ Object
Returns the value of attribute views.
29 30 31 |
# File 'lib/howcast/client/user.rb', line 29 def views @views end |