Class: SilencerShop::User
Instance Method Summary collapse
- #authenticated? ⇒ Boolean
-
#initialize(options = {}) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(options = {}) ⇒ User
Returns a new instance of User.
4 5 6 7 8 |
# File 'lib/silencer_shop/user.rb', line 4 def initialize( = {}) requires!(, :username, :password) @client = SilencerShop::Client.new(username: [:username], password: [:password]) end |
Instance Method Details
#authenticated? ⇒ Boolean
10 11 12 |
# File 'lib/silencer_shop/user.rb', line 10 def authenticated? @client.access_token.present? end |