Class: Dependencies::Dependency

Inherits:
Object
  • Object
show all
Defined in:
lib/bowline/dependencies/lib/dependencies/dependency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, *options) ⇒ Dependency

Returns a new instance of Dependency.



4
5
6
7
8
9
10
11
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 4

def initialize(name, *options)
  opts = options.last.is_a?(Hash) ? options.pop : {}
  vers = options

  @name     = name
  @versions = vers
  @options  = opts
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 2

def name
  @name
end

#optionsObject

Returns the value of attribute options.



2
3
4
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 2

def options
  @options
end

#versionsObject

Returns the value of attribute versions.



2
3
4
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 2

def versions
  @versions
end