Class: Dependencies::Custom
- Inherits:
-
Dependency
- Object
- Dependency
- Dependencies::Custom
- Defined in:
- lib/dependencies/custom.rb
Defined Under Namespace
Classes: CustomConfigError
Constant Summary
Constants inherited from Dependency
Dependency::DESCRIPTION_TYPE_WIDTH
Instance Attribute Summary
Attributes inherited from Dependency
Instance Method Summary collapse
- #always_act? ⇒ Boolean
-
#initialize(definition) ⇒ Custom
constructor
A new instance of Custom.
- #meet ⇒ Object
- #met? ⇒ Boolean
- #unmeet ⇒ Object
Methods inherited from Dependency
#exit_code, #failure?, #output, #should_meet?, #success?, #type
Constructor Details
#initialize(definition) ⇒ Custom
Returns a new instance of Custom.
7 8 9 10 11 |
# File 'lib/dependencies/custom.rb', line 7 def initialize(definition) super @definition = definition @name, @config = parse_definition end |
Instance Method Details
#always_act? ⇒ Boolean
17 18 19 |
# File 'lib/dependencies/custom.rb', line 17 def always_act? true end |
#meet ⇒ Object
21 22 23 |
# File 'lib/dependencies/custom.rb', line 21 def meet execute(up_command) if up_command end |
#met? ⇒ Boolean
13 14 15 |
# File 'lib/dependencies/custom.rb', line 13 def met? false end |
#unmeet ⇒ Object
25 26 27 |
# File 'lib/dependencies/custom.rb', line 25 def unmeet execute(down_command) if down_command end |