Class: LiveJournal::Request::Login
Instance Method Summary collapse
-
#initialize(user) ⇒ Login
constructor
A new instance of Login.
-
#run ⇒ Object
Fills in the
fullname
of the #User this was created with.
Methods inherited from Req
#dryrun!, #dumpresponse, #verbose!
Constructor Details
#initialize(user) ⇒ Login
Returns a new instance of Login.
30 31 32 |
# File 'lib/livejournal/login.rb', line 30 def initialize(user) super(user, 'login') end |
Instance Method Details
#run ⇒ Object
Fills in the fullname
of the #User this was created with. (XXX this sould be updated to also get the list of communities, etc.)
35 36 37 38 39 40 41 |
# File 'lib/livejournal/login.rb', line 35 def run super u = @user # should we clone here? u.fullname = @result['name'] u.journals = @result.select{|k,v| k=~/^access_\d+/}.collect{|k,v| v}.sort u end |