Module: Appfirst::Client::Shared

Included in:
Mock, Real
Defined in:
lib/appfirst/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



22
23
24
# File 'lib/appfirst/client.rb', line 22

def path
  @path
end

#urlObject (readonly)

Returns the value of attribute url.



22
23
24
# File 'lib/appfirst/client.rb', line 22

def url
  @url
end

#userObject (readonly)

Returns the value of attribute user.



22
23
24
# File 'lib/appfirst/client.rb', line 22

def user
  @user
end

Instance Method Details

#setup(options) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'lib/appfirst/client.rb', line 24

def setup(options)
  @url  = options[:url] || ENV["APPFIRST_URL"] || "https://engineyard.appfirst.com"
  @path = options[:path] || "/api/v3"

  # For auth
  @user     = options[:user]
  @password = options[:password]

  @logger = options[:logger] || Logger.new(nil)
end