Class: Assets::Rule
- Inherits:
-
Object
- Object
- Assets::Rule
- Includes:
- AbstractType, Adamantium
- Defined in:
- lib/assets/rule.rb,
lib/assets/rule/file.rb,
lib/assets/rule/concat.rb,
lib/assets/rule/rename.rb,
lib/assets/rule/compile.rb,
lib/assets/rule/compile/css.rb,
lib/assets/rule/compile/javascript.rb,
lib/assets/rule/compile/javascript/coffescript.rb
Overview
Abstract base class for rules that generate assets
Defined Under Namespace
Classes: Compile, Concat, File, Rename
Instance Method Summary collapse
-
#asset ⇒ Asset
private
Return asset.
-
#body ⇒ String
private
Return body.
-
#fresh_at?(time) ⇒ true, false
private
Test if asset is fresh at specific time.
-
#mime ⇒ Mime
private
Return mime.
-
#rename(name) ⇒ Rule::Rename
private
Return renamed asset.
-
#updated_at ⇒ Time
private
Return updated at.
Instance Method Details
#asset ⇒ Asset
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return asset
13 14 15 |
# File 'lib/assets/rule.rb', line 13 def asset Evaluator.new(self).asset end |
#body ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return body
23 |
# File 'lib/assets/rule.rb', line 23 abstract_method :body |
#fresh_at?(time) ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if asset is fresh at specific time
64 65 66 |
# File 'lib/assets/rule.rb', line 64 def fresh_at?(time) time >= updated_at end |
#mime ⇒ Mime
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return mime
31 |
# File 'lib/assets/rule.rb', line 31 abstract_method :mime |
#rename(name) ⇒ Rule::Rename
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return renamed asset
49 50 51 |
# File 'lib/assets/rule.rb', line 49 def rename(name) Rename.new(name, self) end |
#updated_at ⇒ Time
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return updated at
39 |
# File 'lib/assets/rule.rb', line 39 abstract_method :updated_at |