Class: Maven::Goal
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#implementation ⇒ Object
Returns the value of attribute implementation.
-
#language ⇒ Object
Returns the value of attribute language.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(parent, name) ⇒ Goal
constructor
A new instance of Goal.
- #new_parameter ⇒ Object
- #prepare ⇒ Object
- #process(line) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(parent, name) ⇒ Goal
Returns a new instance of Goal.
329 330 331 332 |
# File 'lib/maven.rb', line 329 def initialize(parent, name) @parent = parent @name = name.strip end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
325 326 327 |
# File 'lib/maven.rb', line 325 def description @description end |
#implementation ⇒ Object
Returns the value of attribute implementation.
326 327 328 |
# File 'lib/maven.rb', line 326 def implementation @implementation end |
#language ⇒ Object
Returns the value of attribute language.
326 327 328 |
# File 'lib/maven.rb', line 326 def language @language end |
#name ⇒ Object
Returns the value of attribute name.
325 326 327 |
# File 'lib/maven.rb', line 325 def name @name end |
#parameters ⇒ Object
Returns the value of attribute parameters.
327 328 329 |
# File 'lib/maven.rb', line 327 def parameters @parameters end |
Instance Method Details
#new_parameter ⇒ Object
370 371 372 373 374 375 |
# File 'lib/maven.rb', line 370 def new_parameter parameter = Parameter.new(self) self.parameters ||= [] self.parameters << parameter parameter end |
#prepare ⇒ Object
334 335 336 337 |
# File 'lib/maven.rb', line 334 def prepare super parameters.each{|parameter| parameter.prepare} end |
#process(line) ⇒ Object
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/maven.rb', line 339 def process(line) case @status || :none when :none skip_to(/^Description\:/, :description) when :description if /^Implementation\: (.*?)$/ =~ line self.implementation = $1.strip @status = :language else self.description ||= [] self.description << line.strip end self when :language key, value = *line.split(": ", 2) self.language = value.strip @status = :parameters skip_to(/^Parameters\:/, :parameters) when :parameters if line.strip == "" self elsif /^#{'=' * 40}/ =~ line parent else new_parameter end else raise "unimplemented" end end |