class Trusty::Utilities::YamlContext
Public Class Methods
new(content) { |self| ... }
click to toggle source
# File lib/trusty/utilities/yaml_context.rb, line 8 def initialize(content, &block) @content = content yield(self) if block_given? end
render(content, &block)
click to toggle source
# File lib/trusty/utilities/yaml_context.rb, line 4 def self.render(content, &block) new(content, &block).render end
Public Instance Methods
render()
click to toggle source
# File lib/trusty/utilities/yaml_context.rb, line 14 def render YAML.load ERB.new(@content).result(binding) end