Class: Maven::Model::Execution

Inherits:
Tag
  • Object
show all
Defined in:
lib/maven/model/model.rb

Instance Method Summary collapse

Methods inherited from Tag

#_name, _tags, #comment, prepend_tags, tags, #to_xml

Constructor Details

#initialize(id = nil) ⇒ Execution

Returns a new instance of Execution.



182
183
184
# File 'lib/maven/model/model.rb', line 182

def initialize(id = nil)
  self.id id if id
end

Instance Method Details

#configuration(c = nil) ⇒ Object



186
187
188
189
# File 'lib/maven/model/model.rb', line 186

def configuration(c = nil)
  @configuration = Configuration.new(c) if c
  @configuration ||= Configuration.new({})
end

#execute_goal(g) ⇒ Object



191
192
193
194
# File 'lib/maven/model/model.rb', line 191

def execute_goal(g)
  self.goals = g
  self
end

#goalsObject



200
201
202
# File 'lib/maven/model/model.rb', line 200

def goals
  @goals ||= []
end

#goals=(goals) ⇒ Object



204
205
206
# File 'lib/maven/model/model.rb', line 204

def goals=(goals)
  @goals = goals.is_a?(Array) ? goals: [goals]
end

#with(config) ⇒ Object



196
197
198
# File 'lib/maven/model/model.rb', line 196

def with(config)
  self.configuration config
end