Module: Challah::Rolls::Permission::ClassMethods
- Defined in:
- lib/challah/rolls/permission.rb
Instance Method Summary collapse
-
#[](key) ⇒ Permission?
Quickly access a
Permission
instance by the provided key.
Instance Method Details
#[](key) ⇒ Permission?
Quickly access a Permission
instance by the provided key. If no Permission
is found with that key, nil
is returned.
90 91 92 |
# File 'lib/challah/rolls/permission.rb', line 90 def [](key) self.find_by_key(key.to_s.strip.downcase.gsub(' ', '_')) end |