Class: ERBX

Inherits:
Object
  • Object
show all
Defined in:
lib/erbx.rb,
lib/erbx/version.rb

Constant Summary collapse

VERSION =
'0.1.3'

Class Method Summary collapse

Class Method Details

.load(filename, options = {}) ⇒ Object



5
6
7
# File 'lib/erbx.rb', line 5

def load(filename, options = {})
  new File.read(filename), options
end

.new(content, options = {}) ⇒ Object



9
10
11
12
# File 'lib/erbx.rb', line 9

def new(content, options = {})
  erb_content = expose_erb_tags content, options
  ERB.new erb_content, trim_mode: '%-'
end