Module: Rack::When

Defined in:
lib/rack/when.rb,
lib/rack/when/builder.rb,
lib/rack/when/version.rb

Defined Under Namespace

Classes: Builder

Constant Summary collapse

VERSION =
"1.0.0"

Class Method Summary collapse

Class Method Details

.development(&block) ⇒ Object



9
10
11
# File 'lib/rack/when.rb', line 9

def development &block
  environment :development, &block
end

.environment(environment, &block) ⇒ Object



29
30
31
# File 'lib/rack/when.rb', line 29

def environment environment, &block
  Builder.new(environment,block).mount
end

.environments(*environments, &block) ⇒ Object



25
26
27
# File 'lib/rack/when.rb', line 25

def environments *environments, &block
  Builder.new(*environments,block).mount
end

.production(&block) ⇒ Object



21
22
23
# File 'lib/rack/when.rb', line 21

def production &block
  environment :production, &block
end

.staging(&block) ⇒ Object



17
18
19
# File 'lib/rack/when.rb', line 17

def staging &block
  environment :staging, &block
end

.test(&block) ⇒ Object



13
14
15
# File 'lib/rack/when.rb', line 13

def test &block
  environment :test, &block
end