Top Level Namespace

Defined Under Namespace

Modules: Sinatra

Instance Method Summary collapse

Instance Method Details

#appObject



17
18
19
20
# File 'lib/sinatra/assetpack/rake.rb', line 17

def app
  require File.expand_path(APP_FILE, Dir.pwd)
  class_from_string(APP_CLASS)
end

#class_from_string(str) ⇒ Object



11
12
13
14
15
# File 'lib/sinatra/assetpack/rake.rb', line 11

def class_from_string(str)
  str.split('::').inject(Object) do |mod, class_name|
    mod.const_get(class_name)
  end
end