class OroGen::HTML::TaskContext
Attributes
page[R]
task[R]
template[R]
Public Class Methods
new(page)
click to toggle source
# File lib/orogen/html/task_context.rb, line 8 def initialize(page) path = File.join(File.dirname(__FILE__), "task_context_fragment.page") @template = ERB.new(File.read(path)) @template.filename = path @page = page end
Public Instance Methods
render(task, options = Hash.new)
click to toggle source
# File lib/orogen/html/task_context.rb, line 15 def render(task, options = Hash.new) options, push_options = Kernel.filter_options options, :doc => true, :external_objects => nil @task = task if options[:doc] && task.doc page.push nil, page.main_doc(task.doc) end page.push(nil, template.result(binding), push_options) end