Class: Setka::Workflow::Client

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/setka/workflow/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
# File 'lib/setka/workflow/client.rb', line 13

def initialize(attrs = {})
  self.configuration.attributes = attrs
end

Instance Method Details

#configurationObject



33
34
35
# File 'lib/setka/workflow/client.rb', line 33

def configuration
  @configuration ||= Configuration.new
end

#configure {|configuration| ... } ⇒ Object

Yields:



29
30
31
# File 'lib/setka/workflow/client.rb', line 29

def configure
  yield configuration if block_given?
end

#delete(path, body = nil, options) ⇒ Object



25
26
27
# File 'lib/setka/workflow/client.rb', line 25

def delete(path, body = nil, options)
  invoke_verb(:delete, uri(path), body, with_auth(options))
end

#patch(path, body = nil, options) ⇒ Object



21
22
23
# File 'lib/setka/workflow/client.rb', line 21

def patch(path, body = nil, options)
  invoke_verb(:patch, uri(path), body, with_auth(options))
end

#post(path, body, options) ⇒ Object



17
18
19
# File 'lib/setka/workflow/client.rb', line 17

def post(path, body, options)
  invoke_verb(:post, uri(path), body, with_auth(options))
end