Class: JekyllTask

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) {|_self| ... } ⇒ JekyllTask

:yield: self

Yields:

  • (_self)

Yield Parameters:

  • _self (JekyllTask)

    the object that the method was called on



32
33
34
35
36
37
38
39
40
41
42
# File 'lib/jekylltask.rb', line 32

def initialize(name) # :yield: self
  @name = name
  @source = nil
  @target = nil
  @auto = false
  @description = nil
  yield self if block_given?
  raise "User must specify source directory" unless self.source
  raise "User must specify target directory" unless self.target
  generate
end

Instance Attribute Details

#autoObject

Returns the value of attribute auto.



47
48
49
# File 'lib/jekylltask.rb', line 47

def auto
  @auto
end

#descriptionObject

Returns the value of attribute description.



48
49
50
# File 'lib/jekylltask.rb', line 48

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



44
45
46
# File 'lib/jekylltask.rb', line 44

def name
  @name
end

#sourceObject

Returns the value of attribute source.



45
46
47
# File 'lib/jekylltask.rb', line 45

def source
  @source
end

#targetObject

Returns the value of attribute target.



46
47
48
# File 'lib/jekylltask.rb', line 46

def target
  @target
end