Module: Padrino::Mounter::ApplicationExtension
- Defined in:
- padrino-core/lib/padrino-core/mounter/application_extension.rb
Instance Attribute Summary collapse
-
#cascade ⇒ Object
Returns the value of attribute cascade.
-
#mounter_options ⇒ Object
Returns the value of attribute mounter_options.
- #public_folder ⇒ Object
-
#uri_root ⇒ Object
Returns the value of attribute uri_root.
Instance Method Summary collapse
- #app_file ⇒ Object
- #app_name ⇒ Object
- #dependencies ⇒ Object
- #prerequisites ⇒ Object
- #root ⇒ Object
- #setup_application! ⇒ Object
Instance Attribute Details
#cascade ⇒ Object
Returns the value of attribute cascade.
4 5 6 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 4 def cascade @cascade end |
#mounter_options ⇒ Object
Returns the value of attribute mounter_options.
4 5 6 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 4 def @mounter_options end |
#public_folder ⇒ Object
23 24 25 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 23 def public_folder @public_folder ||= trace_method(:public_folder) { "" } end |
#uri_root ⇒ Object
Returns the value of attribute uri_root.
4 5 6 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 4 def uri_root @uri_root end |
Instance Method Details
#app_file ⇒ Object
15 16 17 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 15 def app_file @__app_file ||= trace_method(:app_file) { [:app_file] } end |
#app_name ⇒ Object
27 28 29 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 27 def app_name @__app_name ||= [:app_name] || self.to_s.underscore.to_sym end |
#dependencies ⇒ Object
7 8 9 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 7 def dependencies @__dependencies ||= Dir.glob("#{root}/**/*.rb").delete_if { |path| path == app_file } end |
#prerequisites ⇒ Object
11 12 13 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 11 def prerequisites @__prerequisites ||= [] end |
#root ⇒ Object
19 20 21 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 19 def root @__root ||= trace_method(:root) { File.("#{app_file}/../") } end |
#setup_application! ⇒ Object
31 32 33 34 35 36 37 |
# File 'padrino-core/lib/padrino-core/mounter/application_extension.rb', line 31 def setup_application! @configured ||= trace_method(:setup_application!) do $LOAD_PATH.concat(prerequisites) require_dependencies if root.start_with?(Padrino.root) true end end |