Class: Wewoo::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/wewoo/configuration.rb

Class Method Summary collapse

Class Method Details

.debug(value = false) ⇒ Object



3
4
5
# File 'lib/wewoo/configuration.rb', line 3

def self.debug(value=false)
  @debug ||= value
end

.url(host = nil, port = nil) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/wewoo/configuration.rb', line 7

def self.url(host=nil, port=nil)
  @url = nil if host
  @url ||= begin
    url = compute_url( host, port) || ENV['WEWOO_URL'] || default_url
    url.to_s.gsub( %r(/*$), '' )
  end
end