Method: Merb::AssetsMixin#asset_exists?
- Defined in:
- lib/merb-assets/assets_mixin.rb
#asset_exists?(asset_type, asset_path) ⇒ Boolean
Parameters
asset_type<Symbol>: A symbol representing the type of the asset. asset_path<String>: The path to the asset
Returns
exists?<Boolean>
Examples
This tests whether a give asset exists in the file system.
98 99 100 |
# File 'lib/merb-assets/assets_mixin.rb', line 98 def asset_exists?(asset_type, asset_path) File.exists?(Merb.root / asset_path(asset_type, asset_path, true)) end |