Class: InstanceId::Configure
- Inherits:
-
Object
- Object
- InstanceId::Configure
- Defined in:
- lib/instance_id/configure.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#server_key ⇒ Object
Returns the value of attribute server_key.
Instance Method Summary collapse
- #base_url ⇒ Object
- #headers ⇒ Object
-
#initialize ⇒ Configure
constructor
A new instance of Configure.
Constructor Details
permalink #initialize ⇒ Configure
Returns a new instance of Configure.
6 7 8 9 |
# File 'lib/instance_id/configure.rb', line 6 def initialize @server_key = '' @logger = Logger.new(STDOUT) end |
Instance Attribute Details
permalink #logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/instance_id/configure.rb', line 4 def logger @logger end |
permalink #server_key ⇒ Object
Returns the value of attribute server_key.
3 4 5 |
# File 'lib/instance_id/configure.rb', line 3 def server_key @server_key end |
Instance Method Details
permalink #base_url ⇒ Object
[View source]
18 19 20 |
# File 'lib/instance_id/configure.rb', line 18 def base_url 'https://iid.googleapis.com' end |
permalink #headers ⇒ Object
[View source]
11 12 13 14 15 16 |
# File 'lib/instance_id/configure.rb', line 11 def headers { 'Authorization' => "key=#{@server_key}", 'Content-Type' => 'application/json' } end |