twitter-status-bot/.gems/gems/twitter-5.11.0/lib/twitter/token.rb

17 lines
299 B
Ruby
Raw Normal View History

require 'twitter/base'
module Twitter
class Token < Twitter::Base
attr_reader :access_token, :token_type
alias_method :to_s, :access_token
BEARER_TYPE = 'bearer'
# @return [Boolean]
def bearer?
@attrs[:token_type] == BEARER_TYPE
end
memoize :bearer?
end
end