class Regiment::Client
Public Class Methods
new(endpoint)
click to toggle source
# File lib/regiment/client.rb, line 7 def initialize(endpoint) combined = endpoint.split(":") @host = combined[0] @port = combined[1].to_i end
Public Instance Methods
about(order, options={})
click to toggle source
# File lib/regiment/client.rb, line 25 def about(order, options={}) return RestClient.get(build_uri("/about/#{order}")) end
build_uri(path)
click to toggle source
# File lib/regiment/client.rb, line 13 def build_uri(path) return URI::HTTP.build({:host => @host, :port => @port, :path => path}).to_s end
execute(order, options={})
click to toggle source
# File lib/regiment/client.rb, line 21 def execute(order, options={}) return RestClient.get(build_uri("/execute/#{order}")) end
version()
click to toggle source
# File lib/regiment/client.rb, line 17 def version return RestClient.get(build_uri("/version")) end