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

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

Instance Method Summary collapse

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
# File 'lib/faalis/dashboard/dsl.rb', line 30

def override_views(*views, &block)

  define_method(:_override_views) do
    result = views || []
    result.concat(block.call) if block_given?
    result
  end

end