Class: Warbler::Authorization
- Inherits:
-
Object
- Object
- Warbler::Authorization
- Defined in:
- lib/warbler/authorization.rb
Instance Method Summary collapse
- #header ⇒ Object
-
#initialize(method, url, device_token = nil) ⇒ Authorization
constructor
A new instance of Authorization.
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
#header ⇒ Object
12 13 14 |
# File 'lib/warbler/authorization.rb', line 12 def header [ base_header, header_params ].compact.join(', ') end |