Module: Sinatra::Initializers

Defined in:
lib/sinatra-initializers.rb,
lib/sinatra-initializers/version.rb

Constant Summary collapse

VERSION =
'0.1.4'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.registered(app) ⇒ Object



15
16
17
18
19
# File 'lib/sinatra-initializers.rb', line 15

def self.registered app
  Dir["#{app.config_directory}/**/*.rb"].each do |file_path|
    require File.join(Dir.pwd, file_path)
  end
end

.versionObject



5
6
7
# File 'lib/sinatra-initializers/version.rb', line 5

def self.version
  VERSION
end

Instance Method Details

#config_directory=(path) ⇒ Object



10
11
12
13
# File 'lib/sinatra-initializers.rb', line 10

def config_directory= path
  super
  register Sinatra::Initializers
end