Class: Package
- Inherits:
-
Object
- Object
- Package
- Defined in:
- lib/teuton/case_manager/case/builtin/package.rb
Instance Attribute Summary collapse
-
#param ⇒ Object
Returns the value of attribute param.
Instance Method Summary collapse
-
#initialize(parent) ⇒ Package
constructor
A new instance of Package.
- #installed? ⇒ Boolean
- #not_installed? ⇒ Boolean
Constructor Details
#initialize(parent) ⇒ Package
Returns a new instance of Package.
5 6 7 |
# File 'lib/teuton/case_manager/case/builtin/package.rb', line 5 def initialize(parent) @parent = parent end |
Instance Attribute Details
#param ⇒ Object
Returns the value of attribute param.
3 4 5 |
# File 'lib/teuton/case_manager/case/builtin/package.rb', line 3 def param @param end |
Instance Method Details
#installed? ⇒ Boolean
9 10 11 12 13 |
# File 'lib/teuton/case_manager/case/builtin/package.rb', line 9 def installed? @parent.target("Package #{@param} installed?") @parent.run "whereis #{@param}" @parent.expect_one [ 'bin', @param ] end |
#not_installed? ⇒ Boolean
15 16 17 18 19 |
# File 'lib/teuton/case_manager/case/builtin/package.rb', line 15 def not_installed? @parent.target("Package #{@param} not installed?") @parent.run "whereis #{@param}" @parent.expect_none [ 'bin' , @param ] end |