Module: Sablon::Context

Defined in:
lib/sablon/context.rb

Overview

A context represents the user supplied arguments to render a template.

This module contains transformation functions to turn a user supplied hash into a data structure suitable for rendering the docx template.

Class Method Summary collapse

Class Method Details

.transform_hash(hash) ⇒ Object



10
11
12
# File 'lib/sablon/context.rb', line 10

def transform_hash(hash)
  Hash[hash.map { |k, v| transform_pair(k.to_s, v) }]
end