Module: Ki::Model::Restrictions
- Included in:
- Ki::Model
- Defined in:
- lib/ki/modules/restrictions.rb
Instance Method Summary collapse
- #forbid(*actions) ⇒ Object
- #forbidden_actions ⇒ Object
- #required_attributes ⇒ Object
- #requires(*attributes) ⇒ Object
- #unique(*attributes) ⇒ Object
- #unique_attributes ⇒ Object
Instance Method Details
#forbid(*actions) ⇒ Object
8 9 10 |
# File 'lib/ki/modules/restrictions.rb', line 8 def forbid(*actions) generic_restriction :forbidden_actions, actions end |
#forbidden_actions ⇒ Object
4 5 6 |
# File 'lib/ki/modules/restrictions.rb', line 4 def forbidden_actions [] end |
#required_attributes ⇒ Object
12 13 14 |
# File 'lib/ki/modules/restrictions.rb', line 12 def required_attributes [] end |
#requires(*attributes) ⇒ Object
16 17 18 |
# File 'lib/ki/modules/restrictions.rb', line 16 def requires(*attributes) generic_restriction :required_attributes, attributes end |
#unique(*attributes) ⇒ Object
24 25 26 |
# File 'lib/ki/modules/restrictions.rb', line 24 def unique(*attributes) generic_restriction :unique_attributes, attributes end |
#unique_attributes ⇒ Object
20 21 22 |
# File 'lib/ki/modules/restrictions.rb', line 20 def unique_attributes [] end |