--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "This is the mechanism for setting up your application layout. There are three application layouts in Merb:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "1."
    body: "Regular app/:type layout of Ruby on Rails fame:"
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: app/models for models app/mailers for mailers (special type of controllers) app/parts for parts, Merb components app/views for templates app/controllers for controller lib for libraries
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "2."
    body: "Flat application layout:"
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: application.rb for models, controllers, mailers, etc config/init.rb for initialization and router configuration config/framework.rb for framework and dependencies configuration views for views
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "3."
    body: Camping-style &quot;very flat&quot; application layout, where the whole Merb
  type: :NUMBER
- !ruby/struct:SM::Flow::P 
  body: application and configs are contained within a single file.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Notes
- !ruby/struct:SM::Flow::P 
  body: "Autoloading for lib uses an empty glob by default. If you want to have your libraries under lib use autoload, add the following to Merb init file:"
- !ruby/struct:SM::Flow::P 
  body: "Merb.push_path(:lib, Merb.root / &quot;lib&quot;, &quot;**/*.rb&quot;) # glob set explicity."
- !ruby/struct:SM::Flow::P 
  body: Then lib/magicwand/lib/magicwand.rb with MagicWand module will be autoloaded when you first access that constant.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::P 
  body: "This method gives you a way to build up your own application structure, for instance, to reflect the structure Rails uses to simplify transition of legacy application, you can set it up like this:"
- !ruby/struct:SM::Flow::P 
  body: Merb.push_path(:model, Merb.root / &quot;app&quot; / &quot;models&quot;, &quot;**/*.rb&quot;) Merb.push_path(:mailer, Merb.root / &quot;app&quot; / &quot;models&quot;, &quot;**/*.rb&quot;) Merb.push_path(:controller, Merb.root / &quot;app&quot; / &quot;controllers&quot;, &quot;**/*.rb&quot;) Merb.push_path(:view, Merb.root / &quot;app&quot; / &quot;views&quot;, &quot;**/*.rb&quot;)
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "type<Symbol>:"
    body: The type of path being registered (i.e. :view)
  - !ruby/struct:SM::Flow::LI 
    label: "path<String>:"
    body: The full path
  - !ruby/struct:SM::Flow::LI 
    label: "file_glob<String>:"
    body: A glob that will be used to autoload files under the path. Defaults to &quot;**/*.rb&quot;.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: ":api: public"
full_name: Merb::push_path
is_singleton: true
name: push_path
params: (type, path, file_glob = "**/*.rb")
visibility: public
