Class: Maven::Tools::DSL::Jarfile::ParentWithLock

Inherits:
Object
  • Object
show all
Defined in:
lib/maven/tools/dsl/jarfile.rb

Defined Under Namespace

Classes: Guarded

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, lock_file) ⇒ ParentWithLock

Returns a new instance of ParentWithLock.



46
47
48
49
50
51
52
# File 'lib/maven/tools/dsl/jarfile.rb', line 46

def initialize( parent, lock_file )
  @lock = lock_file
  @parent = parent
  # TODO remove case when parent is nil
  @deps = Guarded.new( parent ? parent.dependencies : [],
                       lock_file )
end

Instance Attribute Details

#lockObject (readonly)

Returns the value of attribute lock.



44
45
46
# File 'lib/maven/tools/dsl/jarfile.rb', line 44

def lock
  @lock
end

#parentObject (readonly)

Returns the value of attribute parent.



44
45
46
# File 'lib/maven/tools/dsl/jarfile.rb', line 44

def parent
  @parent
end

Instance Method Details

#dependenciesObject



54
55
56
# File 'lib/maven/tools/dsl/jarfile.rb', line 54

def dependencies
  @deps
end