Class: Dependencies::Custom

Inherits:
Dependency show all
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

#name

Instance Method Summary collapse

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

Returns:

  • (Boolean)


17
18
19
# File 'lib/dependencies/custom.rb', line 17

def always_act?
  true
end

#meetObject



21
22
23
# File 'lib/dependencies/custom.rb', line 21

def meet
  execute(up_command) if up_command
end

#met?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/dependencies/custom.rb', line 13

def met?
  false
end

#unmeetObject



25
26
27
# File 'lib/dependencies/custom.rb', line 25

def unmeet
  execute(down_command) if down_command
end