Class: ERBX

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

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.load(filename) ⇒ Object



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

def load(filename)
  new File.read filename
end

.new(content) ⇒ Object



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

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