Module: PinballWizard::ViewHelpers::Sinatra::Slim

Defined in:
lib/pinball_wizard/view_helpers/sinatra/slim.rb

Instance Method Summary collapse

Instance Method Details

#feature(name, opts_or_locals = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/pinball_wizard/view_helpers/sinatra/slim.rb', line 5

def feature(name, opts_or_locals = {})
  unless PinballWizard::Registry.disabled?(name)
    partial_name = opts_or_locals.fetch(:partial) { name }
    locals = opts_or_locals.tap { |h| h.delete(:partial) }
    partial "features/#{partial_name}", locals
  end
end