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.
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
#block ⇒ Object (readonly)
Returns the value of attribute block.
3 4 5 |
# File 'lib/moonshot/task.rb', line 3 def block @block end |
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
3 4 5 |
# File 'lib/moonshot/task.rb', line 3 def desc @desc end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/moonshot/task.rb', line 3 def name @name end |