class Condenser::EjxTransformer

Attributes

options[RW]

Public Class Methods

call(environment, input) click to toggle source
# File lib/condenser/transformers/ejx.rb, line 17
def self.call(environment, input)
  new.call(environment, input)
end
new(options = {}) click to toggle source
# File lib/condenser/transformers/ejx.rb, line 5
def initialize(options = {})
  @options = options
end
setup(environment) click to toggle source
# File lib/condenser/transformers/ejx.rb, line 9
def self.setup(environment)
  require 'ejx' unless defined?(::EJX)

  if !environment.path.include?(EJX::ASSET_DIR)
    environment.append_path(EJX::ASSET_DIR)
  end
end

Public Instance Methods

call(environment, input) click to toggle source
# File lib/condenser/transformers/ejx.rb, line 21
def call(environment, input)
  input[:source] = EJX::Template.new(input[:source], @options).to_module
end