Class: Neurogami::Rhesus::Rhezamar

Inherits:
Object
  • Object
show all
Defined in:
lib/rhesus/rhezamar.rb

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Rhezamar

Returns a new instance of Rhezamar.



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

def initialize text
  @text = text
end

Instance Method Details

#result(variables_hash) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/rhesus/rhezamar.rb', line 9

def result variables_hash
  t = @text.dup
  variables_hash.each do |k, v|
    t.gsub!(  /<\|=\s*#{k}\s*\|>/m, v  )
  end
  t
end