OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/widget/base.rb

20 lines
379 B

class Widget::Base < Widget
attr_reader :engine
def initialize(query)
@query = query
@engine = query.class
end
def render
raise NotImplementedError, "#render is missing in my subclass"
end
def render_with_options(options = {}, &block)
if canvas = options[:to]
canvas << "\n" << render(&block)
else
render(&block)
end
end
end