Class: AgentClient::Process
- Inherits:
-
Object
- Object
- AgentClient::Process
- Extended by:
- Request
- Includes:
- Request
- Defined in:
- lib/agent_client/process.rb
Overview
Represents an Indigo process
Instance Attribute Summary collapse
-
#info ⇒ Object
Returns the value of attribute info.
-
#process_name ⇒ Object
Returns the value of attribute process_name.
-
#process_url ⇒ Object
Returns the value of attribute process_url.
-
#store_info ⇒ Object
Returns the value of attribute store_info.
Instance Method Summary collapse
- #create_map(*args) ⇒ Object
- #find_segments(options = {}) ⇒ Object
- #get_map_ids(options = {}) ⇒ Object
- #get_segment(link_hash) ⇒ Object
-
#initialize(url, process_name, process_info, store_info) ⇒ Process
constructor
A new instance of Process.
Methods included from Request
Constructor Details
#initialize(url, process_name, process_info, store_info) ⇒ Process
Returns a new instance of Process.
24 25 26 27 28 29 |
# File 'lib/agent_client/process.rb', line 24 def initialize(url, process_name, process_info, store_info) self.process_name = process_name self.process_url = "#{url}/#{process_name}" self.info = process_info self.store_info = store_info end |
Instance Attribute Details
#info ⇒ Object
Returns the value of attribute info.
22 23 24 |
# File 'lib/agent_client/process.rb', line 22 def info @info end |
#process_name ⇒ Object
Returns the value of attribute process_name.
22 23 24 |
# File 'lib/agent_client/process.rb', line 22 def process_name @process_name end |
#process_url ⇒ Object
Returns the value of attribute process_url.
22 23 24 |
# File 'lib/agent_client/process.rb', line 22 def process_url @process_url end |
#store_info ⇒ Object
Returns the value of attribute store_info.
22 23 24 |
# File 'lib/agent_client/process.rb', line 22 def store_info @store_info end |
Instance Method Details
#create_map(*args) ⇒ Object
31 32 33 34 35 |
# File 'lib/agent_client/process.rb', line 31 def create_map(*args) result = post(process_url + '/segments', json: args) Segment.new(self, result) end |
#find_segments(options = {}) ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/agent_client/process.rb', line 41 def find_segments( = {}) result = get(process_url + '/segments?' + URI.encode_www_form()) result.map do |link| Segment.new(self, link) end end |
#get_map_ids(options = {}) ⇒ Object
37 38 39 |
# File 'lib/agent_client/process.rb', line 37 def get_map_ids( = {}) get(process_url + '/maps?' + URI.encode_www_form()) end |