Module: ApplicationModule
- Defined in:
- lib/application_module.rb,
lib/application_module/version.rb,
lib/application_module/controller.rb
Defined Under Namespace
Modules: Autoloading, Controller
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
27 28 29 |
# File 'lib/application_module.rb', line 27 def path @path end |
Class Method Details
.extended(app_module) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/application_module.rb', line 7 def self.extended(app_module) #puts "Loading application module: #{app_module}" require 'pathname' app_module.instance_variable_set( :@path, Pathname.new( caller.first[%r{^[^:]+}].sub(%r{\.rb$}, '') ) ) app_module.instance_eval do extend ApplicationModule::Autoloading autoload_without_namespacing %w( models views controllers helpers concerns mailers ) end end |
Instance Method Details
#view_path ⇒ Object
29 30 31 |
# File 'lib/application_module.rb', line 29 def view_path path.join 'views' end |