Module: EJX

Defined in:
lib/ejx.rb,
lib/ejx/version.rb

Defined Under Namespace

Classes: Template, TemplateError

Constant Summary collapse

ASSET_DIR =
File.join(__dir__, 'ejx', 'assets')
VOID_ELEMENTS =
[
  'area',
  'base',
  'br',
  'col',
  'embed',
  'hr',
  'img',
  'input',
  'link',
  'meta',
  'param',
  'source',
  'track',
  'wbr'
]
VERSION =
'1.3'
@@settings =
{
  open_tag: '<%',
  close_tag: '%>',
  
  open_tag_modifiers: {
    escape: '=',
    unescape: '-',
    comment: '#',
    literal: '%'
  },

  close_tag_modifiers: {
    trim: '-',
    literal: '%'
  },
  
  escape: nil
}

Class Method Summary collapse

Class Method Details

.compile(source, options = {}) ⇒ Object



46
47
48
# File 'lib/ejx.rb', line 46

def self.compile(source, options = {})
  EJX::Template.new(source, options).to_module
end

.settingsObject



50
51
52
# File 'lib/ejx.rb', line 50

def self.settings
  @@settings
end

.settings=(value) ⇒ Object



54
55
56
# File 'lib/ejx.rb', line 54

def self.settings=(value)
  @@settings = value
end