Class: Tilt::YAML2JSON::Template

Inherits:
Template
  • Object
show all
Defined in:
lib/tilt/yaml2json/template.rb

Instance Method Summary collapse

Instance Method Details

#allows_script?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/tilt/yaml2json/template.rb', line 18

def allows_script?
  false
end

#evaluateObject



14
15
16
# File 'lib/tilt/yaml2json/template.rb', line 14

def evaluate(*)
  @output ||= MultiJson.dump(YAML.load(data), pretty: true)
end

#prepareObject



10
11
12
# File 'lib/tilt/yaml2json/template.rb', line 10

def prepare
  # do nothing
end