class RendertronRuby::Client

Constants

DEFAULT_HOST
DEFAULT_RENDER_PATH
DEFAULT_SCHEME
DEFAULT_SS_PATH

Public Class Methods

new(options) click to toggle source
# File lib/rendertron_ruby/client.rb, line 16
def initialize(options)
  @host = options[:host] || default_host
  @scheme = options[:scheme] || default_scheme
  @render_path = options[:render_path] || default_render_path
  @ss_path = options[:ss_path] || default_ss_path
end

Public Instance Methods

get(url) click to toggle source
# File lib/rendertron_ruby/client.rb, line 23
def get(url)
  request(:get, "#{render_path}/#{url}")
end
get_ss(url) click to toggle source
# File lib/rendertron_ruby/client.rb, line 27
def get_ss(url)
  request(:get, "#{ss_path}/#{url}")
end

Private Instance Methods

default_host() click to toggle source
# File lib/rendertron_ruby/client.rb, line 33
def default_host
  DEFAULT_HOST
end
default_render_path() click to toggle source
# File lib/rendertron_ruby/client.rb, line 41
def default_render_path
  DEFAULT_RENDER_PATH
end
default_scheme() click to toggle source
# File lib/rendertron_ruby/client.rb, line 37
def default_scheme
  DEFAULT_SCHEME
end
default_ss_path() click to toggle source
# File lib/rendertron_ruby/client.rb, line 45
def default_ss_path
  DEFAULT_SS_PATH
end