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.
10 11 12 |
# File 'lib/eventick/auth.rb', line 10 def initialize(&block) block.call self if block_given? end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/eventick/auth.rb', line 7 def email @email end |
#password=(value) ⇒ Object (writeonly)
Sets the attribute password
8 9 10 |
# File 'lib/eventick/auth.rb', line 8 def password=(value) @password = value end |
Instance Method Details
#authenticated? ⇒ Boolean
18 19 20 |
# File 'lib/eventick/auth.rb', line 18 def authenticated? !!@token end |
#token ⇒ Object
14 15 16 |
# File 'lib/eventick/auth.rb', line 14 def token @token ||= (get)['token'] end |