Class: Moonshot::Task
- Inherits:
-
Object
- Object
- Moonshot::Task
- Defined in:
- lib/moonshot/task.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, desc, &block) ⇒ Task
constructor
A new instance of Task.
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
#block ⇒ Object (readonly)
Returns the value of attribute block.
5 6 7 |
# File 'lib/moonshot/task.rb', line 5 def block @block end |
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
5 6 7 |
# File 'lib/moonshot/task.rb', line 5 def desc @desc end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/moonshot/task.rb', line 5 def name @name end |