Module: Faalis::Dashboard::DSL::ClassMethods

Defined in:
lib/faalis/dashboard/dsl.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) override_views(*views, &block)

override the default view for given views or the result of the given block, by the one from the application



29
30
31
32
33
34
35
36
37
38
# File 'lib/faalis/dashboard/dsl.rb', line 29

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