Class: Rumember::Account
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Dispatcher
#dispatch, #lists, #locations, #transaction_dispatch
Constructor Details
#initialize(interface, auth_token) ⇒ Account
Returns a new instance of Account.
7
8
9
10
|
# File 'lib/rumember/account.rb', line 7
def initialize(interface, auth_token)
@interface = interface
@auth_token = auth_token
end
|
Instance Attribute Details
#auth_token ⇒ Object
Returns the value of attribute auth_token.
5
6
7
|
# File 'lib/rumember/account.rb', line 5
def auth_token
@auth_token
end
|
Instance Method Details
#inspect ⇒ Object
36
37
38
|
# File 'lib/rumember/account.rb', line 36
def inspect
"#<#{self.class.inspect}: #{username}>"
end
|
#new_timeline ⇒ Object
20
21
22
|
# File 'lib/rumember/account.rb', line 20
def new_timeline
Timeline.new(self)
end
|
#params ⇒ Object
16
17
18
|
# File 'lib/rumember/account.rb', line 16
def params
{'auth_token' => auth_token}
end
|
#parent ⇒ Object
12
13
14
|
# File 'lib/rumember/account.rb', line 12
def parent
@interface
end
|
#smart_add(name) ⇒ Object
28
29
30
|
# File 'lib/rumember/account.rb', line 28
def smart_add(name)
timeline.smart_add(name)
end
|
#timeline ⇒ Object
24
25
26
|
# File 'lib/rumember/account.rb', line 24
def timeline
@timeline ||= new_timeline
end
|
#username ⇒ Object
32
33
34
|
# File 'lib/rumember/account.rb', line 32
def username
@username ||= dispatch('auth.checkToken')['auth']['user']['username']
end
|