module Fenix

Constants

VERSION

Public Class Methods

after_load(&block) click to toggle source

@example

Fenix.after_load do
  # ...
end

@return [Array<Proc>] @since 1.0.0 @api public

# 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) click to toggle source

@example

Fenix.before_load do
  # ...
end

@return [Array<Proc>] @since 1.0.0 @api public

# File lib/fenix/core.rb, line 55
def before_load(&block)
  @_before_load ||= []
  @_before_load << block if block_given?
  @_before_load
end
env()
Alias for: environment
environment() click to toggle source

Returns the current environmental state

@example

Fenix.environment
# => :production

Fenix.environment
# => :test

@return [Symbol] @since 1.0.0 @api public

# File lib/fenix/core.rb, line 41
def environment
  @_environment ||= RACK_ENV.to_sym.downcase
end
Also aliased as: env
load_paths() click to toggle source

@example

Fenix.load_paths << Dir[Fenix.root('app', 'controllers', '**')]

@return [Array<String>] @since 1.0.0 @api public

# 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) click to toggle source

@example

Fenix.root('Application', 'Views')
# => '/Home/Fenix/Application/Views'

Fenix.root
# => '/Home/Fenix'

@return [String] @since 1.0.0 @api public

# File lib/fenix/core.rb, line 23
def root(*paths)
  File.join(FENIX_ROOT, *paths)
end
version() click to toggle source
# File lib/fenix/core/version.rb, line 5
def version
  VERSION
end