Module: Padrino::Module
- Defined in:
- lib/padrino-core/module.rb
Instance Attribute Summary collapse
-
#root(*args) ⇒ String
Helper method for file references within a Padrino module.
Instance Method Summary collapse
-
#dependency_paths ⇒ Array<String>
Returns the list of path globs to load as dependencies.
-
#gem!(name) ⇒ Object
Register this module as being loaded from a gem.
Instance Attribute Details
#root(*args) ⇒ String
Helper method for file references within a Padrino module.
32 33 34 |
# File 'lib/padrino-core/module.rb', line 32 def root(*args) File.(File.join(@root, *args)) end |
Instance Method Details
#dependency_paths ⇒ Array<String>
Returns the list of path globs to load as dependencies. Appends custom dependency patterns to the be loaded for Padrino.
51 52 53 54 55 56 |
# File 'lib/padrino-core/module.rb', line 51 def dependency_paths [ "#{root}/lib/**/*.rb", "#{root}/shared/lib/**/*.rb", "#{root}/models/**/*.rb", "#{root}/shared/models/**/*.rb" ] end |