Class: Cjoiner::Engines::JsJoiner

Inherits:
Engine
  • Object
show all
Defined in:
lib/cjoiner/engines/jsjoiner.rb

Overview

engine for js files

Instance Attribute Summary

Attributes inherited from Engine

#engine

Instance Method Summary collapse

Methods inherited from Engine

#render

Methods included from Helpers::Files

#delete_file, #expand_path, #file, #file_exists, #load_yaml, #move_file, #on_windows, #read_file, #temp_file, #write_file

Constructor Details

#initialize(opts) ⇒ JsJoiner

Returns a new instance of JsJoiner.



30
31
32
33
34
35
# File 'lib/cjoiner/engines/jsjoiner.rb', line 30

def initialize(opts)
  @engine = ::Sprockets::Secretary.new(
    :load_path    => opts[:paths],
    :source_files => opts[:sources]
  ).concatenation.to_s
end