Class: CanTango::Config::Permits::Key
- Inherits:
-
Object
- Object
- CanTango::Config::Permits::Key
- Includes:
- Singleton
- Defined in:
- lib/cantango/permits_ext/config/permits/key.rb
Instance Method Summary collapse
Instance Method Details
#create_for(ability) ⇒ Object
10 11 12 |
# File 'lib/cantango/permits_ext/config/permits/key.rb', line 10 def create_for ability ability.respond_to?(:subject) ? maker.create_for(ability) : maker.new(ability) end |
#hash_for(ability) ⇒ Object
6 7 8 |
# File 'lib/cantango/permits_ext/config/permits/key.rb', line 6 def hash_for ability create_for(ability).value end |