Class: EacRailsBase0::XEngine
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- EacRailsBase0::XEngine
- Defined in:
- lib/eac_rails_base0/x_engine.rb
Overview
A extended version of [Rails::Engine].
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.local_root ⇒ Object
19 20 21 |
# File 'lib/eac_rails_base0/x_engine.rb', line 19 def local_root ::Rails.root.join(::EacRailsBase0::Paths.engines_subpath) end |
.require_local ⇒ Object
13 14 15 16 17 |
# File 'lib/eac_rails_base0/x_engine.rb', line 13 def require_local local_roots.each do |root| require_dependency "#{root.basename.to_path.gsub('-', '/')}/engine" end end |
Instance Method Details
#local? ⇒ Boolean
38 39 40 41 42 |
# File 'lib/eac_rails_base0/x_engine.rb', line 38 def local? return false unless self.class.local_root.directory? ::Find.find(self.class.local_root.to_path).include?(config.root.to_path) end |
#namespace_module_name ⇒ Object
44 45 46 |
# File 'lib/eac_rails_base0/x_engine.rb', line 44 def namespace_module_name __getobj__.class.name.deconstantize end |