Class: Tennpipes::Mounter::ApplicationWrapper
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Tennpipes::Mounter::ApplicationWrapper
- Defined in:
- lib/tennpipes-base/mounter.rb
Instance Attribute Summary collapse
- #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
-
#initialize(app, options = {}) ⇒ ApplicationWrapper
constructor
A new instance of ApplicationWrapper.
- #prerequisites ⇒ Object
- #root ⇒ Object
- #setup_application! ⇒ Object
Constructor Details
#initialize(app, options = {}) ⇒ ApplicationWrapper
Returns a new instance of ApplicationWrapper.
21 22 23 24 |
# File 'lib/tennpipes-base/mounter.rb', line 21 def initialize(app, = {}) @options = super(app) end |
Instance Attribute Details
#public_folder ⇒ Object
46 47 48 49 50 |
# File 'lib/tennpipes-base/mounter.rb', line 46 def public_folder return @public_folder if @public_folder obj = __getobj__ @public_folder = obj.respond_to?(:public_folder) ? obj.public_folder : "" end |
#uri_root ⇒ Object
Returns the value of attribute uri_root.
18 19 20 |
# File 'lib/tennpipes-base/mounter.rb', line 18 def uri_root @uri_root end |
Instance Method Details
#app_file ⇒ Object
34 35 36 37 38 |
# File 'lib/tennpipes-base/mounter.rb', line 34 def app_file return @__app_file if @__app_file obj = __getobj__ @__app_file = obj.respond_to?(:app_file) ? obj.app_file : @options[:app_file] end |
#app_name ⇒ Object
52 53 54 |
# File 'lib/tennpipes-base/mounter.rb', line 52 def app_name @__app_name ||= @options[:app_name] || __getobj__.to_s.underscore.to_sym end |
#dependencies ⇒ Object
26 27 28 |
# File 'lib/tennpipes-base/mounter.rb', line 26 def dependencies @__dependencies ||= Dir["#{root}/**/*.rb"] end |
#prerequisites ⇒ Object
30 31 32 |
# File 'lib/tennpipes-base/mounter.rb', line 30 def prerequisites @__prerequisites ||= [] end |
#root ⇒ Object
40 41 42 43 44 |
# File 'lib/tennpipes-base/mounter.rb', line 40 def root return @__root if @__root obj = __getobj__ @__root = obj.respond_to?(:root) ? obj.root : File.("#{app_file}/../") end |
#setup_application! ⇒ Object
56 57 58 59 60 61 62 63 |
# File 'lib/tennpipes-base/mounter.rb', line 56 def setup_application! @configured ||= begin $LOAD_PATH.concat(prerequisites) Tennpipes.require_dependencies(dependencies, :force => true) if root.start_with?(Tennpipes.root) true end end |