Class: YMDP::Compiler::Template::CoffeeScript
- Defined in:
- lib/ymdp/compiler/template.rb
Constant Summary
Constants included from ActionView::Helpers::TagHelper
ActionView::Helpers::TagHelper::BOOLEAN_ATTRIBUTES
Instance Attribute Summary
Attributes inherited from View
Attributes inherited from Base
#assets_directory, #domain, #file, #hash, #host, #message, #server
Instance Method Summary collapse
-
#write_template(result) ⇒ Object
Compile CoffeeScript into JavaScript and write it.
Methods inherited from View
#base_filename, #convert_filename, #process_coffee, #process_erb, #process_haml, #process_scss, #validator
Methods included from LinkTagHelper
#link_to, #link_to_function, #link_to_unless_current
Methods included from FormTagHelper
#label, #password_field, #text_field
Methods included from AssetTagHelper
Methods included from ApplicationView
#combo, #english_languages, #include_firebug_lite, #javascript_include, #render, #supported_languages, #translations
Methods included from ActionView::Helpers::TagHelper
#cdata_section, #content_tag, #escape_once, #tag
Methods inherited from Base
#base_filename, #build, #destination_path, #initialize, #partial?, #process_erb, #processed_template, #server_path, #servers_path, #set_content_variables, #verbose, #verbose?, #write_template_with_layout, #write_template_without_layout
Methods inherited from Base
#base_path, base_path, #configuration, configuration, configure, #content_variables, display_path, #display_path, #paths, #servers
Constructor Details
This class inherits a constructor from YMDP::Compiler::Template::Base
Instance Method Details
#write_template(result) ⇒ Object
Compile CoffeeScript into JavaScript and write it
337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/ymdp/compiler/template.rb', line 337 def write_template(result) @file.gsub!(/\.coffee$/, "") filename = @file.split("/").last tmp_filename = "#{TMP_PATH}/#{filename}" # result = process_coffee(process_erb(result)) result = process_coffee(result) F.save_to_file(result, tmp_filename) write_template_without_layout(result) end |