Class: Twitter::Token

Inherits:
Base
  • Object
show all
Defined in:
lib/twitter/token.rb

Constant Summary

BEARER_TYPE =
'bearer'

Instance Attribute Summary (collapse)

Attributes inherited from Base

#attrs

Instance Method Summary (collapse)

Methods inherited from Base

#[], attr_reader, display_uri_attr_reader, #initialize, object_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap, pmap_with_index

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Attribute Details

- (Object) access_token (readonly) Also known as: to_s

Returns the value of attribute access_token



5
6
7
# File 'lib/twitter/token.rb', line 5

def access_token
  @access_token
end

- (Object) token_type (readonly)

Returns the value of attribute token_type



5
6
7
# File 'lib/twitter/token.rb', line 5

def token_type
  @token_type
end

Instance Method Details

- (Boolean) bearer?

Returns:

  • (Boolean)


11
12
13
# File 'lib/twitter/token.rb', line 11

def bearer?
  @attrs[:token_type] == BEARER_TYPE
end