Class: CodeSync::Processors::JstProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/code_sync/processors/jst_processor.rb

Class Method Summary collapse

Class Method Details

.process(contents, filename = "adhoc", extension = ".jst") ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/code_sync/processors/jst_processor.rb', line 6

def self.process contents,filename="adhoc",extension=".jst"
  contents.match(/this.JST\[(.*)\]/) do |match|
    if match[1]
      contents[match[1]] = "\"#{filename}\""
    end
  end

  contents
end