Class: Chairman::Holmes::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/chairman/holmes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(host) ⇒ Client



9
10
11
12
13
14
15
16
# File 'lib/chairman/holmes.rb', line 9

def initialize(host)
  @api_client = Sawyer::Agent.new(host, {serializer: Sawyer::Serializer.yajl}) do |http|
    http.headers['content-type'] = 'application/json'
  end

  @headers = {}
  @body = ''
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



7
8
9
# File 'lib/chairman/holmes.rb', line 7

def body
  @body
end

#headersObject

Returns the value of attribute headers.



7
8
9
# File 'lib/chairman/holmes.rb', line 7

def headers
  @headers
end

Instance Method Details

#extensionsObject



22
23
24
# File 'lib/chairman/holmes.rb', line 22

def extensions
  get '/extensions'
end

#rootObject



18
19
20
# File 'lib/chairman/holmes.rb', line 18

def root
  get '/'
end