Class: Eventick::Auth

Inherits:
Base
  • Object
show all
Defined in:
lib/eventick/auth.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

path, resource, translate

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

#emailObject

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

Parameters:

  • value

    the value to set the attribute password to.



8
9
10
# File 'lib/eventick/auth.rb', line 8

def password=(value)
  @password = value
end

Instance Method Details

#authenticated?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/eventick/auth.rb', line 18

def authenticated?
  !!@token
end

#tokenObject



14
15
16
# File 'lib/eventick/auth.rb', line 14

def token
  @token ||= (get)['token']
end