Class: Neurogami::Rhesus::Rhezamar
- Inherits:
-
Object
- Object
- Neurogami::Rhesus::Rhezamar
- Defined in:
- lib/rhesus/rhezamar.rb
Instance Method Summary collapse
-
#initialize(text) ⇒ Rhezamar
constructor
A new instance of Rhezamar.
- #result(variables_hash) ⇒ Object
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 |