Module: Riot::Rack::SituationExtensions

Defined in:
lib/riot-rack.rb

Instance Method Summary collapse

Instance Method Details

#appObject

the default behavior is to look for a config.ru file starting with current directory and working our way back



26
27
28
29
30
31
32
# File 'lib/riot-rack.rb', line 26

def app
  file = app_file
  ::Rack::Builder.new {
    contents = ::File.readlines(file).join("\n")
    instance_eval(contents)
  }.to_app
end

#app_fileObject



34
35
36
# File 'lib/riot-rack.rb', line 34

def app_file
  @app_file || find_app_file
end

#app_file=(file) ⇒ Object



38
39
40
# File 'lib/riot-rack.rb', line 38

def app_file=(file)
  @app_file = file
end