Class: Coyodlee::SessionToken

Inherits:
Object
  • Object
show all
Defined in:
lib/coyodlee/session_tokens.rb

Instance Method Summary collapse

Constructor Details

#initialize(token = '') ⇒ SessionToken

Returns a new instance of SessionToken.


15
16
17
# File 'lib/coyodlee/session_tokens.rb', line 15

def initialize(token='')
  @token = token
end

Instance Method Details

#present?Boolean

Returns true if the token is not empty; false otherwise

Returns:

  • (Boolean)

    Returns true if the token is not empty; false otherwise


20
21
22
# File 'lib/coyodlee/session_tokens.rb', line 20

def present?
  !@token.empty?
end

#to_sString

Returns the string value of the token

Returns:

  • (String)

    Returns the string value of the token


25
26
27
# File 'lib/coyodlee/session_tokens.rb', line 25

def to_s
  @token
end