Module: Flippeur::ViewHelpers

Defined in:
lib/flippeur/rails_helpers.rb

Instance Method Summary collapse

Instance Method Details

#feature?(name) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
# File 'lib/flippeur/rails_helpers.rb', line 4

def feature?(name)
  available = Flippeur.find(name).available? controller.send(Flippeur.actor)
  block_given? ? (yield if available) : available
end