Sha256: 28ba932665d36fc59ba52c12ba150ea731c4f03d12648e88924e589de5b29c12
Contents?: true
Size: 638 Bytes
Versions: 16
Compression:
Stored size: 638 Bytes
Contents
module Hoth class Endpoint attr_accessor :host, :port, :module_name, :transport class ConfigEvaluator attr_reader :endpoint def initialize(endpoint, &block) @endpoint = endpoint instance_eval(&block) end [:host, :port, :module_name, :transport].each do |endpoint_attribute| define_method endpoint_attribute do |value| endpoint.send("#{endpoint_attribute}=", value) end end end def initialize(&block) ConfigEvaluator.new(self, &block) end def to_url "http://#{@host}:#{@port}/execute" end end end
Version data entries
16 entries across 16 versions & 2 rubygems