Class: Girdle::Task
- Inherits:
-
Object
- Object
- Girdle::Task
- Defined in:
- lib/girdle/task.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#depends_on ⇒ Object
readonly
Returns the value of attribute depends_on.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Task
constructor
A new instance of Task.
Constructor Details
#initialize(options = {}) ⇒ Task
Returns a new instance of Task.
7 8 9 10 11 12 13 14 15 |
# File 'lib/girdle/task.rb', line 7 def initialize( = {}) @name = [:name] @command = [:command] @arguments = ([:arguments] || []). map {|a| a.respond_to?(:name) ? a.name : a } @depends_on = ([:depends_on] || []). map {|d| d.respond_to?(:name) ? d.name : d } @environment = [:environment] || {} end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
5 6 7 |
# File 'lib/girdle/task.rb', line 5 def arguments @arguments end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
5 6 7 |
# File 'lib/girdle/task.rb', line 5 def command @command end |
#depends_on ⇒ Object (readonly)
Returns the value of attribute depends_on.
5 6 7 |
# File 'lib/girdle/task.rb', line 5 def depends_on @depends_on end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
5 6 7 |
# File 'lib/girdle/task.rb', line 5 def environment @environment end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/girdle/task.rb', line 5 def name @name end |