Class: Jax::Engine::Configuration
- Inherits:
-
Rails::Railtie::Configuration
- Object
- Rails::Railtie::Configuration
- Jax::Engine::Configuration
- Defined in:
- lib/jax/engine/configuration.rb
Direct Known Subclasses
Application::Builtin::Configuration, Application::Configuration
Instance Attribute Summary collapse
- #autoload_once_paths ⇒ Object
- #autoload_paths ⇒ Object
-
#plugins ⇒ Object
Returns the value of attribute plugins.
-
#root ⇒ Object
Returns the value of attribute root.
Instance Method Summary collapse
-
#initialize(path = nil) ⇒ Configuration
constructor
A new instance of Configuration.
- #paths ⇒ Object
Constructor Details
#initialize(path = nil) ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 9 10 11 12 13 |
# File 'lib/jax/engine/configuration.rb', line 6 def initialize(path = nil) super() if defined?(JAX_ROOT) path ||= JAX_ROOT end @root = RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? Pathname.new(path). : Pathname.new(path).realpath end |
Instance Attribute Details
#autoload_once_paths ⇒ Object
38 39 40 |
# File 'lib/jax/engine/configuration.rb', line 38 def autoload_once_paths @autoload_once_paths ||= paths.autoload_once end |
#autoload_paths ⇒ Object
42 43 44 |
# File 'lib/jax/engine/configuration.rb', line 42 def autoload_paths @autoload_paths ||= paths.autoload_paths end |
#plugins ⇒ Object
Returns the value of attribute plugins.
4 5 6 |
# File 'lib/jax/engine/configuration.rb', line 4 def plugins @plugins end |
#root ⇒ Object
Returns the value of attribute root.
2 3 4 |
# File 'lib/jax/engine/configuration.rb', line 2 def root @root end |
Instance Method Details
#paths ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/jax/engine/configuration.rb', line 15 def paths @paths ||= begin paths = Rails::Paths::Root.new(@root) paths.app "app", :glob => "*" paths.app.controllers "app/controllers" paths.app.helpers "app/helpers" paths.app.models "app/models" paths.app.views "app/views" paths.app.shaders "app/shaders" paths.app.resources "app/resources", :glob => "**/*.yml" paths.lib "lib", :load_path => true paths.lib.tasks "lib/tasks", :glob => "**/*.rake" paths.config "config" paths.config.initializers "config/initializers", :glob => "**/*.rb" paths.config.locales "config/locales", :glob => "*.{rb,yml}" paths.config.routes "config/routes.rb" paths.public "public" paths.public.javascripts "public/javascripts" paths.public.stylesheets "public/stylesheets" paths end end |