Module: Mybot::Templates

Defined in:
lib/mybot/templates.rb

Instance Method Summary collapse

Instance Method Details

#tpl(content) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/mybot/templates.rb', line 3

def tpl(content)
  case content
  when String
    Template.new(content)
  when Hash
    Template.new(File.read(content[:file]))
  end
end