Class: Dashboards::CustomElement
- Inherits:
-
Object
- Object
- Dashboards::CustomElement
- Defined in:
- lib/dashboards/dsl.rb
Instance Method Summary collapse
-
#initialize(block) ⇒ CustomElement
constructor
A new instance of CustomElement.
- #render(context) ⇒ Object
Constructor Details
#initialize(block) ⇒ CustomElement
Returns a new instance of CustomElement.
22 23 24 |
# File 'lib/dashboards/dsl.rb', line 22 def initialize(block) @block = block end |
Instance Method Details
#render(context) ⇒ Object
26 27 28 |
# File 'lib/dashboards/dsl.rb', line 26 def render(context) context.instance_eval(&@block) end |