Sha256: f047da562d2aecdb306929ca0a500689cb446a3d7dc8d292da68d577d11a4157

Contents?: true

Size: 838 Bytes

Versions: 15

Compression:

Stored size: 838 Bytes

Contents

require_relative 'extension_constants'
require WEBCONSOLE_FILE

module WebConsole::Dependencies
  class Checker
    require_relative 'dependencies/lib/model'
    require_relative 'dependencies/lib/controller'

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

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

    private

    def controller
      if !@controller
        @controller = Controller.new
      end
      return @controller
    end

  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
webconsole-0.1.18 lib/webconsole/dependencies.rb
webconsole-0.1.17 lib/webconsole/dependencies.rb
webconsole-0.1.16 lib/webconsole/dependencies.rb
webconsole-0.1.15 lib/webconsole/dependencies.rb
webconsole-0.1.14 lib/webconsole/dependencies.rb
webconsole-0.1.13 lib/webconsole/dependencies.rb
webconsole-0.1.12 lib/webconsole/dependencies.rb
webconsole-0.1.11 lib/webconsole/dependencies.rb
webconsole-0.1.10 lib/webconsole/dependencies.rb
webconsole-0.1.5 lib/webconsole/dependencies.rb
webconsole-0.1.4 lib/webconsole/dependencies.rb
webconsole-0.1.3 lib/webconsole/dependencies.rb
webconsole-0.1.2 lib/webconsole/dependencies.rb
webconsole-0.1.1 lib/webconsole/dependencies.rb
webconsole-0.1.0 lib/webconsole/dependencies.rb