Sha256: 4ad459dc66ce4bef1586950be7e9340908278b99afd8f31f852c697f87f22734
Contents?: true
Size: 953 Bytes
Versions: 17
Compression:
Stored size: 953 Bytes
Contents
module JsTestCore class Configuration class << self attr_accessor :instance def method_missing(method_name, *args, &block) if Configuration.instance.respond_to?(method_name) Configuration.instance.send(method_name, *args, &block) else super end end end attr_accessor :host, :port, :spec_root_path, :public_path, :core_path def initialize(params={}) params = { :spec_root_path => File.expand_path("./specs/javascripts"), :public_path => File.expand_path("./public"), :host => DEFAULT_HOST, :port => DEFAULT_PORT, }.merge(params) @spec_root_path = ::File.expand_path(params[:spec_root_path]) @public_path = ::File.expand_path(params[:public_path]) @host = params[:host] @port = params[:port] @core_path = params[:core_path] end def root_url "http://#{host}:#{port}" end end end
Version data entries
17 entries across 17 versions & 4 rubygems