Sha256: 5682932974f0d628faf332ab7b95de69ea008cf93a16931b8343963913d262a7
Contents?: true
Size: 988 Bytes
Versions: 31
Compression:
Stored size: 988 Bytes
Contents
module Capricorn class System module Config def use_development! environment { 'development' } end def development? environment == 'development' end def use_production! environment { 'production' } end def production? environment == 'production' end def environment(&block) option(:environment, block) { |s,v| v or 'production' } end def use_ssl! option(:use_ssl, lambda { true }) end def use_ssl? option(:use_ssl, nil) end def bind(hostname=nil, port=nil) server_hostname { hostname } server_port { port } end def server_hostname(&block) option(:server_hostname, block) { |v| v or 'localhost' } end def server_port(&block) option(:server_port, block) { |v| v or 5000 } end end end end
Version data entries
31 entries across 31 versions & 2 rubygems