Class: Dply::Pkgs
Instance Attribute Summary collapse
-
#all ⇒ Object
readonly
Returns the value of attribute all.
-
#build ⇒ Object
readonly
Returns the value of attribute build.
-
#runtime ⇒ Object
readonly
Returns the value of attribute runtime.
Instance Method Summary collapse
-
#initialize(pkgs_yml) ⇒ Pkgs
constructor
A new instance of Pkgs.
- #install(build_mode: false) ⇒ Object
- #installed?(build_mode: false) ⇒ Boolean
Methods included from Helper
#cmd, #error, #git, #logger, #sh, #symlink
Constructor Details
#initialize(pkgs_yml) ⇒ Pkgs
Returns a new instance of Pkgs.
12 13 14 15 |
# File 'lib/dply/pkgs.rb', line 12 def initialize(pkgs_yml) @pkgs_yml = pkgs_yml read_config end |
Instance Attribute Details
#all ⇒ Object (readonly)
Returns the value of attribute all.
10 11 12 |
# File 'lib/dply/pkgs.rb', line 10 def all @all end |
#build ⇒ Object (readonly)
Returns the value of attribute build.
10 11 12 |
# File 'lib/dply/pkgs.rb', line 10 def build @build end |
#runtime ⇒ Object (readonly)
Returns the value of attribute runtime.
10 11 12 |
# File 'lib/dply/pkgs.rb', line 10 def runtime @runtime end |
Instance Method Details
#install(build_mode: false) ⇒ Object
17 18 19 20 |
# File 'lib/dply/pkgs.rb', line 17 def install(build_mode: false) pkgs = build_mode ? @all : @runtime Yum.install pkgs end |
#installed?(build_mode: false) ⇒ Boolean
22 23 24 25 |
# File 'lib/dply/pkgs.rb', line 22 def installed?(build_mode: false) pkgs = build_mode ? @all : @runtime Yum.installed? pkgs end |