Class: Myflickr::User
- Inherits:
-
Struct
- Object
- Struct
- Myflickr::User
- Defined in:
- lib/myflickr/user.rb
Instance Attribute Summary collapse
-
#realname ⇒ Object
Returns the value of attribute realname.
-
#username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Instance Attribute Details
#realname ⇒ Object
Returns the value of attribute realname
2 3 4 |
# File 'lib/myflickr/user.rb', line 2 def realname @realname end |
#username ⇒ Object
Returns the value of attribute username
2 3 4 |
# File 'lib/myflickr/user.rb', line 2 def username @username end |
Class Method Details
.find ⇒ Object
4 5 6 7 |
# File 'lib/myflickr/user.rb', line 4 def find user_lookup = Query.api_call("flickr.people.getInfo") User.new(*%w(username realname).map {|a| (user_lookup/a).inner_text.to_s }) end |