Module: Automux::Controller::Support::Rendering
- Included in:
- Base
- Defined in:
- lib/automux/controller/support/rendering.rb
Instance Method Summary collapse
-
#render(view) ⇒ Object
There are two requirements to render a file.
Instance Method Details
#render(view) ⇒ Object
There are two requirements to render a file.
-
@binding
-
file_name
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/automux/controller/support/rendering.rb', line 9 def render(view) path = # If the full path to the file is given, use that instead. if FileTest.exists?(view) view else deduce_full_path(view) end execute Automux::Library::MiniErb.new(File.read(path)).result(@binding) end |