Module: Padrino::Module

### Home Classes Methods

### In Files

- lib/padrino-core/module.rb

### Methods

- #dependency_paths
- #gem!

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Padrino
- Padrino::Application
- Padrino::ApplicationLoadError
- Padrino::ApplicationSetupError
- Padrino::Cli
- Padrino::Cli::Adapter
- Padrino::Cli::Base
- Padrino::Erubis
- Padrino::Erubis::SafeBufferEnhancer
- Padrino::Erubis::SafeBufferTemplate
- Padrino::Erubis::Template
- Padrino::Filter
- Padrino::Flash
- Padrino::Flash::Helpers
- Padrino::Flash::Storage
- Padrino::Logger
- Padrino::Logger::Colorize
- Padrino::Logger::Extensions
- Padrino::Logger::Rack
- Padrino::Module
- Padrino::Mounter
- Padrino::Mounter::MounterException
- Padrino::Reloader
- Padrino::Reloader::Rack
- Padrino::Rendering
- Padrino::Rendering::ClassMethods
- Padrino::Rendering::InstanceMethods
- Padrino::Rendering::SafeTemplate
- Padrino::Rendering::TemplateNotFound
- Padrino::Router
- Padrino::Routing
- Padrino::Routing::ClassMethods
- Padrino::Routing::InstanceMethods
- Padrino::Routing::Parent
- Padrino::Routing::UnrecognizedException
- Padrino::Server
- Padrino::ShowExceptions
- Padrino::Tasks
- Padrino::Utils
- HttpRouter
- HttpRouter::Node
- HttpRouter::Node::Path
- HttpRouter::Request
- HttpRouter::Route
- Haml
- Haml::Helpers
- Haml::Util
- Sinatra
- Sinatra::Request
- Slim
- Slim::Template
- Tilt
- Tilt::HamlTemplate
- FileSet
- Kernel
- Module
- Object
- ObjectSpace
- PadrinoTasks
- String
- SupportLite

No matching classes.

# Padrino::Module

### Attributes

root[RW]

### Public Instance Methods

dependency_paths() click to toggle source

Returns the list of path globs to load as dependencies Appends custom dependency patterns to the be loaded for Padrino.

@return [Array<String>]

    The dependency paths.

@example

    module MyModule
      extend Padrino::Module
      gem! 'my_gem'
    end

    Module.dependency_paths << "#{MyModule.root}/uploaders/*.rb"

    # 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

gem!(name) click to toggle source

Register this module as being loaded from a gem. This automatically sets the root and therefore the dependency paths correctly.

@param [String] name

    The name of the gem. Has to be the name as stated in the gemspec.

@returns the gems root.

    # File lib/padrino-core/module.rb, line 13
    def gem!(name)
      self.root = Padrino.gem(name, self)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.