class PuppetHerald::App::LogicImpl
Frontend
logic impl internal class
Public Class Methods
new()
click to toggle source
# File lib/puppet-herald/app/frontend.rb, line 12 def initialize @js = PuppetHerald::Javascript.new end
Public Instance Methods
app_html()
click to toggle source
Gets an app.html @dodgy executed also to raise an exception for testing (application_spec)
# 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)
click to toggle source
Uglify an application JS’s into one minified JS file @param mapname [String] name of source map to be put into uglified JS @return [Hash] a hash with uglified JS and source map
# File lib/puppet-herald/app/frontend.rb, line 30 def uglify(mapname) @js.uglify mapname end