Module: Faalis::Dashboard::DSL::ClassMethods
- Defined in:
- lib/faalis/dashboard/dsl.rb
Instance Method Summary collapse
-
#override_views(*views, &block) ⇒ Object
override the default view for given views or the result of the given block, by the one from the application.
Instance Method Details
#override_views(*views, &block) ⇒ Object
override the default view for given views or the result of the given block, by the one from the application
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/faalis/dashboard/dsl.rb', line 30 def override_views(*views, &block) views.concat(block.call) if block_given? define_method(:_override_views) do result = views || [] result.concat(block.call) if block_given? result end end |