Class: Eventick::Auth
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#password ⇒ Object
writeonly
Sets the attribute password.
Instance Method Summary collapse
- #authenticated? ⇒ Boolean
-
#initialize(&block) ⇒ Auth
constructor
A new instance of Auth.
- #token ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(&block) ⇒ Auth
Returns a new instance of Auth.
8 9 10 |
# File 'lib/eventick/auth.rb', line 8 def initialize(&block) block.call self if block_given? end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/eventick/auth.rb', line 5 def email @email end |
#password=(value) ⇒ Object (writeonly)
Sets the attribute password
6 7 8 |
# File 'lib/eventick/auth.rb', line 6 def password=(value) @password = value end |
Instance Method Details
#authenticated? ⇒ Boolean
16 17 18 |
# File 'lib/eventick/auth.rb', line 16 def authenticated? !!@token end |
#token ⇒ Object
12 13 14 |
# File 'lib/eventick/auth.rb', line 12 def token @token ||= (get)['token'] end |