Class: AssetTask
- Inherits:
-
Object
- Object
- AssetTask
- Defined in:
- lib/asset_compiler/asset_task.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#build_path ⇒ Object
Returns the value of attribute build_path.
-
#name ⇒ Object
Returns the value of attribute name.
-
#remote_dirs ⇒ Object
Returns the value of attribute remote_dirs.
-
#src_files ⇒ Object
Returns the value of attribute src_files.
Instance Method Summary collapse
- #from(path) ⇒ Object
-
#initialize(name, &block) ⇒ AssetTask
constructor
A new instance of AssetTask.
- #to(path) ⇒ Object
-
#transformation ⇒ Object
Captures the transformation run on each individual object.
Constructor Details
#initialize(name, &block) ⇒ AssetTask
Returns a new instance of AssetTask.
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/asset_compiler/asset_task.rb', line 36 def initialize name, &block @name = name @src_files = Rake::FileList.new @remote_dirs = [] instance_eval &block define_clobber define_rebuild define_build_directory_task define_build_task add_dependencies_to_main_task end |
Instance Attribute Details
#build_path ⇒ Object
Returns the value of attribute build_path.
33 34 35 |
# File 'lib/asset_compiler/asset_task.rb', line 33 def build_path @build_path end |
#name ⇒ Object
Returns the value of attribute name.
31 32 33 |
# File 'lib/asset_compiler/asset_task.rb', line 31 def name @name end |
#remote_dirs ⇒ Object
Returns the value of attribute remote_dirs.
34 35 36 |
# File 'lib/asset_compiler/asset_task.rb', line 34 def remote_dirs @remote_dirs end |
#src_files ⇒ Object
Returns the value of attribute src_files.
32 33 34 |
# File 'lib/asset_compiler/asset_task.rb', line 32 def src_files @src_files end |
Instance Method Details
#from(path) ⇒ Object
50 51 52 |
# File 'lib/asset_compiler/asset_task.rb', line 50 def from path @src_files = path end |
#to(path) ⇒ Object
54 55 56 |
# File 'lib/asset_compiler/asset_task.rb', line 54 def to path @build_path = path end |
#transformation ⇒ Object
Captures the transformation run on each individual object.
59 60 61 |
# File 'lib/asset_compiler/asset_task.rb', line 59 def transformation @transformation = Proc.new end |