Class: Dependencies::Apt
Constant Summary
collapse
- PACKAGE_NAME_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, #output, #success?, #type
Constructor Details
This class inherits a constructor from Dependency
Instance Method Details
#meet ⇒ Object
16
17
18
|
# File 'lib/dependencies/apt.rb', line 16
def meet
execute("#{sudo_string}apt-get install -y #{name}")
end
|
#met? ⇒ Boolean
10
11
12
13
14
|
# File 'lib/dependencies/apt.rb', line 10
def met?
return apt_cache_policy.installed_version == package_version if package_version
apt_cache_policy.installed?
end
|
#should_meet? ⇒ Boolean
25
26
27
|
# File 'lib/dependencies/apt.rb', line 25
def should_meet?
`uname`.chomp == "Linux" && system("which apt-get")
end
|
#unmeet ⇒ Object
20
21
22
23
|
# File 'lib/dependencies/apt.rb', line 20
def unmeet
true
end
|