Class: Warbler::Authorization

Inherits:
Object
  • Object
show all
Defined in:
lib/warbler/authorization.rb

Instance Method Summary collapse

Constructor Details

#initialize(method, url, device_token = nil) ⇒ Authorization

Returns a new instance of Authorization.



6
7
8
9
10
# File 'lib/warbler/authorization.rb', line 6

def initialize(method, url, device_token = nil)
  @method       = method.to_s.upcase
  @url          = Addressable::URI.parse(url)
  @device_token = device_token
end

Instance Method Details

#headerObject



12
13
14
# File 'lib/warbler/authorization.rb', line 12

def header
  [ base_header, header_params ].compact.join(', ')
end