Module: Ramaze::Helper::Asset::ClassMethods
- Defined in:
- lib/zen/helper/asset.rb
Overview
Module of which the methods will become available as class methods to the class that included Ramaze::Helper::Asset.
Instance Method Summary (collapse)
-
- (Object) load_asset_group(name, methods = nil)
Loads an asset group.
-
- (Object) serve(type, files, options = {})
Provides a shortcut method to Zen.asset.serve() and automatically loads all the given assets for the calling class.
Instance Method Details
- (Object) load_asset_group(name, methods = nil)
Loads an asset group. This method can either load a single asset group or an array of groups.
51 52 53 54 55 56 57 58 59 |
# File 'lib/zen/helper/asset.rb', line 51 def load_asset_group(name, methods = nil) if name.respond_to?(:each) name.each do |n| Zen.asset.load_asset_group(n, self, methods) end else Zen.asset.load_asset_group(name, self, methods) end end |
- (Object) serve(type, files, options = {})
Provides a shortcut method to Zen.asset.serve() and automatically loads all the given assets for the calling class.
35 36 37 |
# File 'lib/zen/helper/asset.rb', line 35 def serve(type, files, = {}) Zen.asset.serve(type, files, .merge({:controller => self})) end |