Module: YMDP::Generator::Snippets
- Included in:
- Templates::Modifications
- Defined in:
- lib/view.rb
Overview
Pieces of code which will be added to existing files by the Modifications class.
Instance Method Summary collapse
-
#launcher_method(view) ⇒ Object
Creates a method which will launch the new view from within any other view.
Instance Method Details
#launcher_method(view) ⇒ Object
Creates a method which will launch the new view from within any other view.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/view.rb', line 16 def launcher_method(view) view = view.downcase class_name = view.capitalize <<-OUTPUT Launcher.launch#{class_name} = function() { Launcher.launchTab("#{view}", "#{class_name}"); }; OUTPUT end |