Class: Hash
Instance Method Summary collapse
-
#to_hbs ⇒ Object
Serialize Hash to Handlebarer format.
Instance Method Details
#to_hbs ⇒ Object
Serialize Hash to Handlebarer format. Invoke ‘to_hbs` on members
100 101 102 103 104 105 106 |
# File 'lib/handlebarer/serialize.rb', line 100 def to_hbs res = {} each_pair do |key, value| res[key] = (value.respond_to?(:to_hbs) ? value.to_hbs : value) end res end |