Class: Atlas::Client

Inherits:
Object
  • Object
show all
Includes:
Errors
Defined in:
lib/atlas/client.rb

Overview

Client for interacting with the Atlas API.

Constant Summary collapse

DEFAULT_HEADERS =
{ 'User-Agent' => "Atlas-Ruby/#{Atlas::VERSION}",
'Content-Type' => 'application/json' }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.



11
12
13
14
# File 'lib/atlas/client.rb', line 11

def initialize(opts = {})
  @url = opts[:url] || 'https://app.vagrantup.com/'
  @token = opts[:token]
end

Instance Attribute Details

#urlObject

Returns the value of attribute url.



9
10
11
# File 'lib/atlas/client.rb', line 9

def url
  @url
end