Class: Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/vraptor-scaffold/generators/app/dependency/dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(group, name, version = nil, exclusions = []) ⇒ Dependency

Returns a new instance of Dependency.



5
6
7
8
9
10
# File 'lib/vraptor-scaffold/generators/app/dependency/dependency.rb', line 5

def initialize group, name, version=nil, exclusions=[]
  @group = group
  @name = name
  @version = version
  @exclusions = exclusions
end

Instance Attribute Details

#exclusionsObject

Returns the value of attribute exclusions.



3
4
5
# File 'lib/vraptor-scaffold/generators/app/dependency/dependency.rb', line 3

def exclusions
  @exclusions
end

#groupObject

Returns the value of attribute group.



3
4
5
# File 'lib/vraptor-scaffold/generators/app/dependency/dependency.rb', line 3

def group
  @group
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/vraptor-scaffold/generators/app/dependency/dependency.rb', line 3

def name
  @name
end

#versionObject

Returns the value of attribute version.



3
4
5
# File 'lib/vraptor-scaffold/generators/app/dependency/dependency.rb', line 3

def version
  @version
end

Instance Method Details

#has_exclusions?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/vraptor-scaffold/generators/app/dependency/dependency.rb', line 12

def has_exclusions?
  !@exclusions.empty?
end