Class: Cheffish::ServerAPI

Inherits:
Chef::HTTP
  • Object
show all
Defined in:
lib/cheffish/server_api.rb

Overview

Exactly like Chef::ServerAPI, but requires you to pass in what keys you want (no defaults)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url, options = {}) ⇒ ServerAPI

Returns a new instance of ServerAPI.



34
35
36
37
38
39
# File 'lib/cheffish/server_api.rb', line 34

def initialize(url, options = {})
  super(url, options)
  root_url = URI.parse(url)
  root_url.path = ''
  @root_url = root_url.to_s
end

Instance Attribute Details

#root_urlObject (readonly)

Returns the value of attribute root_url.



41
42
43
# File 'lib/cheffish/server_api.rb', line 41

def root_url
  @root_url
end