class GoNative::Utils::TemplateInflator
Attributes
content[R]
Public Class Methods
new(content)
click to toggle source
# File lib/gonative/utils/template_inflator.rb, line 6 def initialize(content) @content = content.dup end
Public Instance Methods
call(values)
click to toggle source
# File lib/gonative/utils/template_inflator.rb, line 10 def call(values) values.each { |name, value| content.gsub!("{{#{name}}}", value.to_s) } content end