Class: PuppetHerald::App::LogicImpl
- Inherits:
-
Object
- Object
- PuppetHerald::App::LogicImpl
- Defined in:
- lib/puppet-herald/app/frontend.rb
Overview
Frontend logic impl internal class
Instance Method Summary collapse
-
#app_html ⇒ Object
Gets an app.html.
-
#initialize ⇒ LogicImpl
constructor
A new instance of LogicImpl.
-
#uglify(mapname) ⇒ Hash
Uglify an application JS’s into one minified JS file.
Constructor Details
#initialize ⇒ LogicImpl
Returns a new instance of LogicImpl.
12 13 14 |
# File 'lib/puppet-herald/app/frontend.rb', line 12 def initialize @js = PuppetHerald::Javascript.new end |
Instance Method Details
#app_html ⇒ Object
Gets an app.html
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/puppet-herald/app/frontend.rb', line 17 def app_html if PuppetHerald.in_prod? minified = '.min' files = ['/app.min.js'] else minified = '' files = @js.files end [minified, files] end |
#uglify(mapname) ⇒ Hash
Uglify an application JS’s into one minified JS file
30 31 32 |
# File 'lib/puppet-herald/app/frontend.rb', line 30 def uglify(mapname) @js.uglify mapname end |