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, define_attribute_method, define_predicate_method, define_uri_method, deprecate_attribute_method, display_uri_attr_reader, #initialize, object_attr_reader, predicate_attr_reader, uri_attr_reader

Methods included from Utils

flat_pmap, pmap

Constructor Details

This class inherits a constructor from Twitter::Base

Instance Attribute Details

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



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

def access_token
  @access_token
end

- (String) token_type (readonly)



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

def token_type
  @token_type
end

Instance Method Details

- (Boolean) bearer?



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

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