Class: Dashboards::CustomElement

Inherits:
Object
  • Object
show all
Defined in:
lib/dashboards/dsl.rb

Instance Method Summary collapse

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