Module: BravoGuard::Model::ClassMethods

Defined in:
lib/bravo_guard/model.rb

Overview

nodoc

Instance Method Summary collapse

Instance Method Details

#permission(*keys, &block) ⇒ Object

nodoc



29
30
31
32
# File 'lib/bravo_guard/model.rb', line 29

def permission(*keys, &block)
  method_name = [:allows, keys].flatten.join('_') + '?'
  define_method method_name, &block
end