Class: RubyView::Context
- Inherits:
-
Object
- Object
- RubyView::Context
- Includes:
- DSL, Helpers::Tag
- Defined in:
- lib/rubyview/context.rb
Instance Method Summary collapse
- #call(path_to_template) ⇒ Object
-
#initialize ⇒ Context
constructor
A new instance of Context.
Methods included from Helpers::Tag
#format_html_opts, #generate_tag, #h1
Methods included from DSL
Constructor Details
#initialize ⇒ Context
Returns a new instance of Context.
7 8 |
# File 'lib/rubyview/context.rb', line 7 def initialize end |
Instance Method Details
#call(path_to_template) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/rubyview/context.rb', line 10 def call(path_to_template) @_rendered_content = "" template_path = File.join(Dir.pwd, path_to_template) template_content = File.read(template_path) instance_eval(template_content) end |