Class: Girdle::Task

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @name         = options[:name]
  @command      = options[:command]
  @arguments    = (options[:arguments] || []).
    map {|a| a.respond_to?(:name) ? a.name : a }
  @depends_on   = (options[:depends_on] || []).
    map {|d| d.respond_to?(:name) ? d.name : d }
  @environment  = options[:environment] || {}
end

Instance Attribute Details

#argumentsObject (readonly)

Returns the value of attribute arguments.



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

def arguments
  @arguments
end

#commandObject (readonly)

Returns the value of attribute command.



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

def command
  @command
end

#depends_onObject (readonly)

Returns the value of attribute depends_on.



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

def depends_on
  @depends_on
end

#environmentObject (readonly)

Returns the value of attribute environment.



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

def environment
  @environment
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end