Module: Bashly::Renderable

Included in:
Models::Base
Defined in:
lib/bashly/concerns/renderable.rb

Instance Method Summary collapse

Instance Method Details

#render(view) ⇒ Object



3
4
5
6
# File 'lib/bashly/concerns/renderable.rb', line 3

def render(view)
  template = File.read view_path(view)
  ERB.new(template, nil, '%-').result(binding)
end

#stringsObject



8
9
10
# File 'lib/bashly/concerns/renderable.rb', line 8

def strings
  @strings ||= MessageStrings.new
end