Class: Dependencies::VersionedDependency

Inherits:
Dependency
  • Object
show all
Defined in:
lib/dependencies/versioned_dependency.rb

Direct Known Subclasses

Apt, Gem

Constant Summary collapse

VERSION_SEPARATOR =
" "

Constants inherited from Dependency

Dependency::DESCRIPTION_TYPE_WIDTH

Instance Attribute Summary

Attributes inherited from Dependency

#name

Instance Method Summary collapse

Methods inherited from Dependency

#always_act?, #exit_code, #initialize, #meet, #met?, #output, #should_meet?, #success?, #type, #unmeet

Constructor Details

This class inherits a constructor from Dependency

Instance Method Details

#dep_nameObject


7
8
9
# File 'lib/dependencies/versioned_dependency.rb', line 7

def dep_name
	name_components[0]
end

#dep_versionObject


11
12
13
# File 'lib/dependencies/versioned_dependency.rb', line 11

def dep_version
	name_components[1]
end

#versioned?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'lib/dependencies/versioned_dependency.rb', line 15

def versioned?
	!!dep_version
end