Class: Dependencies::Apk
Constant Summary
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, #failure?, #initialize, #output, #success?, #type
Constructor Details
This class inherits a constructor from Dependency
Instance Method Details
#meet ⇒ Object
11
12
13
|
# File 'lib/dependencies/apk.rb', line 11
def meet
execute("apk add #{name}")
end
|
#met? ⇒ Boolean
7
8
9
|
# File 'lib/dependencies/apk.rb', line 7
def met?
execute("apk info | grep -q '^#{name}'$")
end
|
#should_meet? ⇒ Boolean
20
21
22
|
# File 'lib/dependencies/apk.rb', line 20
def should_meet?
`uname`.chomp == "Linux" && system("which apk", out: File::NULL, err: File::NULL)
end
|
#unmeet ⇒ Object
15
16
17
18
|
# File 'lib/dependencies/apk.rb', line 15
def unmeet
true
end
|