Class: Soundwave::RakeTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- Soundwave::RakeTask
- Defined in:
- lib/soundwave/rake.rb
Instance Attribute Summary collapse
-
#destination ⇒ Object
Returns the value of attribute destination.
-
#name ⇒ Object
Returns the value of attribute name.
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
- #define ⇒ Object
-
#initialize(name = :pages, source = "./", destination = "./_site") ⇒ RakeTask
constructor
A new instance of RakeTask.
Constructor Details
#initialize(name = :pages, source = "./", destination = "./_site") ⇒ RakeTask
Returns a new instance of RakeTask.
9 10 11 12 13 14 |
# File 'lib/soundwave/rake.rb', line 9 def initialize(name=:pages, source="./", destination="./_site") @name = name @site = Site.new(source) @destination = Pathname(destination). define end |
Instance Attribute Details
#destination ⇒ Object
Returns the value of attribute destination.
7 8 9 |
# File 'lib/soundwave/rake.rb', line 7 def destination @destination end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/soundwave/rake.rb', line 7 def name @name end |
#site ⇒ Object
Returns the value of attribute site.
7 8 9 |
# File 'lib/soundwave/rake.rb', line 7 def site @site end |
Instance Method Details
#define ⇒ Object
16 17 18 19 20 21 |
# File 'lib/soundwave/rake.rb', line 16 def define desc "Build pages in #{@site.source}" task(name) do @site.generate(@destination) end end |