Class: WebConsole::Dependencies::View
- Defined in:
- lib/webconsole/dependencies/lib/view.rb
Constant Summary collapse
- BASE_DIRECTORY =
File.join(File.dirname(__FILE__), '..')
- VIEWS_DIRECTORY =
File.join(BASE_DIRECTORY, "views")
- VIEW_TEMPLATE =
File.join(VIEWS_DIRECTORY, 'view.html.erb')
- ADD_MISSING_DEPENDENCY_FUNCTION =
"addMissingDependency"
Constants inherited from View
View::CSS_EXTENSION, View::CSS_PATH_COMPONENT, View::JS_EXTENSION, View::JS_PATH_COMPONENT
Instance Attribute Summary
Attributes inherited from View
Instance Method Summary collapse
- #add_missing_dependency(name, type, installation_instructions = nil) ⇒ Object
-
#initialize ⇒ View
constructor
A new instance of View.
Methods inherited from View
#base_url=, #base_url_path=, #close, #do_javascript, #do_javascript_function, javascript_function, #javascript_include_tag, #load_erb, #load_erb_from_path, #load_html, #shared_javascript_include_tag, #shared_stylesheet_link_tag, #stylesheet_link_tag
Constructor Details
#initialize ⇒ View
Returns a new instance of View.
8 9 10 11 12 |
# File 'lib/webconsole/dependencies/lib/view.rb', line 8 def initialize super self.base_url_path = File.(BASE_DIRECTORY) load_erb_from_path(VIEW_TEMPLATE) end |
Instance Method Details
#add_missing_dependency(name, type, installation_instructions = nil) ⇒ Object
15 16 17 |
# File 'lib/webconsole/dependencies/lib/view.rb', line 15 def add_missing_dependency(name, type, installation_instructions = nil) self.do_javascript_function(ADD_MISSING_DEPENDENCY_FUNCTION, [name, type, installation_instructions]) end |