Module: FileSet

### Home Classes Methods

### In Files

- lib/padrino-core/support_lite.rb

### Methods

- #glob
- #glob_require

### 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.

# FileSet

FileSet helper method for iterating and interacting with files inside a directory

### Public Instance Methods

glob(glob_pattern, file_path=nil, &block) click to toggle source

Iterates over every file in the glob pattern and yields to a block Returns the list of files matching the glob pattern FileSet.glob('padrino-core/application/*.rb', __FILE__) { |file| load file }

    # File lib/padrino-core/support_lite.rb, line 172
    def glob(glob_pattern, file_path=nil, &block)
      glob_pattern = File.join(File.dirname(file_path), glob_pattern) if file_path
      file_list = Dir.glob(glob_pattern).sort
      file_list.each { |file| block.call(file) }
      file_list
    end

glob_require(glob_pattern, file_path=nil) click to toggle source

Requires each file matched in the glob pattern into the application FileSet.glob_require('padrino-core/application/*.rb', __FILE__)

    # File lib/padrino-core/support_lite.rb, line 183
    def glob_require(glob_pattern, file_path=nil)
      glob(glob_pattern, file_path) { |f| require f }
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.