Class: WebConsole::Dependencies::Controller

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

Instance Attribute Summary

Attributes inherited from Controller

#view

Instance Method Summary collapse

Constructor Details

#initializeController

Returns a new instance of Controller.



9
10
11
# File 'lib/webconsole/dependencies/lib/controller.rb', line 9

def initialize
  @view = View.new
end

Instance Method Details

#missing_dependency(dependency) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/webconsole/dependencies/lib/controller.rb', line 13

def missing_dependency(dependency)
  name = dependency.name
  type = self.class.string_for_type(dependency.type)
  options = dependency.options
  if options.has_key?(:installation_instructions)
    installation_instructions = options[:installation_instructions]
  end      
  @view.add_missing_dependency(name, type, installation_instructions)
end