Class: SilverMother::User

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/silver_mother/user.rb

Constant Summary collapse

USER_PATH =
'user/'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#userObject (readonly)

Returns the value of attribute user.



9
10
11
# File 'lib/silver_mother/user.rb', line 9

def user
  @user
end

Instance Method Details

#call(token) ⇒ Object



11
12
13
# File 'lib/silver_mother/user.rb', line 11

def call(token)
  @user ||= Api.instance.get(USER_PATH, token).to_ostruct
end