Class: WebConsole::Dependencies::Checker

Inherits:
Object
  • Object
show all
Defined in:
lib/webconsole/dependencies.rb

Instance Method Summary collapse

Instance Method Details

#check(dependency) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/webconsole/dependencies.rb', line 18

def check(dependency)
  name = dependency.name
  type = dependency.type
  passed = Tester::check(name, type)
  controller.missing_dependency(dependency) unless passed
  passed
end

#check_dependencies(dependencies) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/webconsole/dependencies.rb', line 9

def check_dependencies(dependencies)
  passed = true
  dependencies.each { |dependency|  
    dependency_passed = check(dependency)
    passed = false unless dependency_passed
  }
  passed
end