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.



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

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.



3
4
5
# File 'lib/moonshot/task.rb', line 3

def block
  @block
end

#descObject (readonly)

Returns the value of attribute desc.



3
4
5
# File 'lib/moonshot/task.rb', line 3

def desc
  @desc
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/moonshot/task.rb', line 3

def name
  @name
end