Class: Gumbo::EcoFile

Inherits:
CompileToJavaScriptFile show all
Defined in:
lib/gumbo/eco_file.rb

Instance Attribute Summary

Attributes inherited from PackageFile

#type

Attributes inherited from AssetFile

#context, #name, #output_dir, #source_dir

Instance Method Summary collapse

Methods inherited from CompileToJavaScriptFile

#build, compile, compiler, #output_file

Methods inherited from PackageFile

#eql?, #hash, #output_file, #source_file

Methods inherited from AssetFile

#build, class_for, #eql?, ext, for, #hash, #initialize, #logger, #output_file, #replace_ext, #should_be_rebuilt?, #source_file

Constructor Details

This class inherits a constructor from Gumbo::AssetFile

Instance Method Details

#compile(src) ⇒ Object



7
8
9
# File 'lib/gumbo/eco_file.rb', line 7

def compile(src)
  "this.JST || (this.JST = {}); this.JST['#{name.sub(/.eco$/,'')}'] = #{Eco.compile(src)};"
end