Sha256: d3dfb364a05457b5969cf65a172c29f9e59ddc3ccb49ee83cf6684dddd2d2b8f
Contents?: true
Size: 504 Bytes
Versions: 6
Compression:
Stored size: 504 Bytes
Contents
module ProductSpy class Configuration include Singleton attr_reader :hosts def initialize @hosts = {} end def host(host, options = {}, &block) host_inst = Host.new(host) yield host_inst @hosts[host.to_sym] = host_inst options = { :aliases => [] }.merge(options) options[:aliases].each do |host| @hosts[host.to_sym] = host_inst end end end def self.setup(&block) yield Configuration.instance end end
Version data entries
6 entries across 6 versions & 1 rubygems