Class: Moonshot::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/moonshot/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, desc, &block) ⇒ Task

Returns a new instance of Task.



7
8
9
10
11
# File 'lib/moonshot/task.rb', line 7

def initialize(name, desc, &block)
  @name = name.to_sym
  @desc = desc
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



5
6
7
# File 'lib/moonshot/task.rb', line 5

def block
  @block
end

#descObject (readonly)

Returns the value of attribute desc.



5
6
7
# File 'lib/moonshot/task.rb', line 5

def desc
  @desc
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/moonshot/task.rb', line 5

def name
  @name
end