Class: GithubPages::DeployTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- GithubPages::DeployTask
- Includes:
- JekyllRakeExt, JsonRakeExt
- Defined in:
- lib/ghpages_deploy/rake/task.rb
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#remote ⇒ Object
Returns the value of attribute remote.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(*args) {|_self| ... } ⇒ DeployTask
constructor
A new instance of DeployTask.
- #register(destination) ⇒ Object
Methods included from JsonRakeExt
directory_sitemap, #json_sitemap, update_sitemap
Methods included from JekyllRakeExt
Constructor Details
#initialize(*args) {|_self| ... } ⇒ DeployTask
Returns a new instance of DeployTask.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ghpages_deploy/rake/task.rb', line 13 def initialize(*args) @args = args @destinations = [] @handler = GithubPages::Handler.new yield self if block_given? @source &&= @source.gsub(%r{^#{Dir.pwd}[\/]?}, '') @source ||= '.' @remote ||= 'origin' @destinations << '.' if @destinations.empty? define end |
Instance Attribute Details
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
31 32 33 |
# File 'lib/ghpages_deploy/rake/task.rb', line 31 def handler @handler end |
#remote ⇒ Object
Returns the value of attribute remote.
30 31 32 |
# File 'lib/ghpages_deploy/rake/task.rb', line 30 def remote @remote end |
#source ⇒ Object
Returns the value of attribute source.
30 31 32 |
# File 'lib/ghpages_deploy/rake/task.rb', line 30 def source @source end |
Instance Method Details
#register(destination) ⇒ Object
33 34 35 |
# File 'lib/ghpages_deploy/rake/task.rb', line 33 def register(destination) @destinations << destination end |