Class: AppFlight::Web::Page
- Inherits:
-
Object
- Object
- AppFlight::Web::Page
- Defined in:
- lib/appflight/web.rb
Instance Method Summary collapse
-
#initialize ⇒ Page
constructor
A new instance of Page.
- #render(name) ⇒ Object
Constructor Details
#initialize ⇒ Page
Returns a new instance of Page.
7 8 9 |
# File 'lib/appflight/web.rb', line 7 def initialize @context = {} end |
Instance Method Details
#render(name) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/appflight/web.rb', line 11 def render(name) determine! # template = "#{name}.erb" # input = File.read("#{AppFlight::Utils.gem_webdir}/#{name}") input = File.read("./#{name}") eruby = Erubis::Eruby.new(input) eruby.result(@context) end |