Module Sinatra::Sugar::ClassMethods
In: lib/sinatra/sugar.rb

Methods

Attributes

guessed_root  [W] 
root  [W] 

Public Instance methods

More advanced register:

  • If an exntesion is registered twice, the registered hook will only be called once.

Like root_path, but does return an array instead of a string. Optionally takes a block that will be called for each entry once.

Example:

  class Foo < BigBand
    root_glob("app", "{models,views,controllers}", "*.rb") { |file| load file }
  end

Short hand so you can skip those ugly File.expand_path(File.join(File.dirname(FILE), …)) lines.

[Validate]