Module: Rango
> define #partial?
Public Visibility
Public Class Method Summary
bundle(name, options = Hash.new) | |
---|---|
dependency(library, options = Hash.new, &block) |
Returns: Boolean |
root |
Public Class Method Details
bundle
public
bundle(name, options = Hash.new)
[View source]
51 52 53 54 55 56 57 58 59 |
# File 'lib/rango/bundling/dependency.rb', line 51 def bundle(name, = Hash.new) dependency = Rango::Bundling::Strategy.find(name, ) if dependency.nil? Rango.logger.error("No dependency strategy matched for #{name} with #{options}") return nil else dependency.register end end |
dependency
public
Boolean
dependency(library, options = Hash.new, &block)
[View source]
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/rango/bundling/dependency.rb', line 29 def dependency(library, = Hash.new, &block) dependency = self.bundle(library, .except(:optional)) if dependency.nil? # else if [:optional] begin dependency.load rescue LoadError Rango.logger.warn("Dependency #{library} isn't available.") end else dependency.load end block.call if block_given? end end |
root
public
root
[View source]
27 28 29 |
# File 'lib/rango.rb', line 27 def self.root File.join(File.dirname(__FILE__), "rango") end |