Class: Maven::Tools::Project
- Inherits:
-
Object
- Object
- Maven::Tools::Project
- Defined in:
- lib/maven/tools/project.rb
Instance Attribute Summary collapse
-
#basedir ⇒ Object
readonly
Returns the value of attribute basedir.
-
#current ⇒ Object
readonly
Returns the value of attribute current.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
-
#initialize(source = nil) ⇒ Project
constructor
A new instance of Project.
Constructor Details
#initialize(source = nil) ⇒ Project
Returns a new instance of Project.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/maven/tools/project.rb', line 29 def initialize( source = nil ) @source = source if @source @basedir ||= ::File.directory?( @source ) ? @source : ::File.dirname( ::File.( @source ) ) end @basedir ||= ::File.( '.' ) @model = Model.new @model.model_version = '4.0.0' @model.name = ::File.basename( @basedir ) @model.group_id = 'no_group_id_given' @model.artifact_id = model.name @model.version = '0.0.0' @current = @model # TODO remove once legacy code is gone @context = :project end |
Instance Attribute Details
#basedir ⇒ Object (readonly)
Returns the value of attribute basedir.
27 28 29 |
# File 'lib/maven/tools/project.rb', line 27 def basedir @basedir end |
#current ⇒ Object (readonly)
Returns the value of attribute current.
27 28 29 |
# File 'lib/maven/tools/project.rb', line 27 def current @current end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
27 28 29 |
# File 'lib/maven/tools/project.rb', line 27 def model @model end |