Class: GithubPages::DeployTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/ghpages_deploy/rake_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) {|_self| ... } ⇒ DeployTask

Returns a new instance of DeployTask.

Yields:

  • (_self)

Yield Parameters:



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/ghpages_deploy/rake_task.rb', line 12

def initialize(*args)
  @args = args
  @destinations = []

  yield self if block_given?

  @source ||= '.'
  @remote ||= 'origin'

  @destinations << '.' if @destinations.empty?

  define
end

Instance Attribute Details

#remoteObject

Returns the value of attribute remote.



26
27
28
# File 'lib/ghpages_deploy/rake_task.rb', line 26

def remote
  @remote
end

#sourceObject

Returns the value of attribute source.



26
27
28
# File 'lib/ghpages_deploy/rake_task.rb', line 26

def source
  @source
end

Instance Method Details

#register(destination) ⇒ Object



28
29
30
# File 'lib/ghpages_deploy/rake_task.rb', line 28

def register(destination)
  @destinations << destination
end