Module: Fenix
- Defined in:
- lib/fenix/core.rb,
lib/fenix/core/version.rb,
lib/fenix/core/response.rb,
lib/fenix/core/settings.rb,
lib/fenix/core/rendering.rb,
lib/fenix/core/exceptions.rb,
lib/fenix/core/application.rb
Defined Under Namespace
Classes: Application, NotFound, Rendering, Response, Settings, TemplateNotFound
Constant Summary
collapse
- VERSION =
'0.0.1'
Class Method Summary
collapse
Class Method Details
.after_load(&block) ⇒ Array<Proc>
70
71
72
73
74
|
# File 'lib/fenix/core.rb', line 70
def after_load(&block)
@_after_load ||= []
@_after_load << block if block_given?
@_after_load
end
|
.before_load(&block) ⇒ Array<Proc>
55
56
57
58
59
|
# File 'lib/fenix/core.rb', line 55
def before_load(&block)
@_before_load ||= []
@_before_load << block if block_given?
@_before_load
end
|
.environment ⇒ Symbol
Also known as:
env
Returns the current environmental state
41
42
43
|
# File 'lib/fenix/core.rb', line 41
def environment
@_environment ||= RACK_ENV.to_sym.downcase
end
|
.load_paths ⇒ Array<String>
83
84
85
86
87
|
# File 'lib/fenix/core.rb', line 83
def load_paths
@_load_paths ||= ['app/controllers/**', 'app/models/**', 'lib/**'].map do |directory|
Dir[Fenix.root(directory)]
end.flatten
end
|
.root(*paths) ⇒ String
23
24
25
|
# File 'lib/fenix/core.rb', line 23
def root(*paths)
File.join(FENIX_ROOT, *paths)
end
|
.version ⇒ Object
5
6
7
|
# File 'lib/fenix/core/version.rb', line 5
def version
VERSION
end
|