Class: Anobik::Resource
- Inherits:
-
Object
- Object
- Anobik::Resource
- Defined in:
- lib/anobik/utils.rb
Instance Method Summary collapse
-
#initialize ⇒ Resource
constructor
A new instance of Resource.
- #render(facename, local_assigns = {}) ⇒ Object
Constructor Details
Instance Method Details
#render(facename, local_assigns = {}) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/anobik/utils.rb', line 12 def render facename, local_assigns = {} local_assigns.each do |key,value| eval "@#{key} = #{value.inspect}" end ERB.new(File.read(ANOBIK_ROOT + ::Anobik::FACES_DIR + facename + '.erb')).result(binding) end |