Module: Relevant::Widget

Defined in:
lib/relevant/widget.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



8
9
10
11
12
# File 'lib/relevant/widget.rb', line 8

def self.included(base)
  base.extend ClassMethods
  
  attr_accessor :options
end

Instance Method Details

#to_htmlObject



14
15
16
17
# File 'lib/relevant/widget.rb', line 14

def to_html
  template_handler = Tilt[self.class.template_format].new { self.class.template.strip }
  template_handler.render(self)
end