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
10 11 12 |
# File 'lib/ki/modules/restrictions.rb', line 10 def forbid(*actions) generic_restriction :forbidden_actions, actions end |
#forbidden_actions ⇒ Object
6 7 8 |
# File 'lib/ki/modules/restrictions.rb', line 6 def forbidden_actions [] end |
#required_attributes ⇒ Object
14 15 16 |
# File 'lib/ki/modules/restrictions.rb', line 14 def required_attributes [] end |
#requires(*attributes) ⇒ Object
18 19 20 |
# File 'lib/ki/modules/restrictions.rb', line 18 def requires(*attributes) generic_restriction :required_attributes, attributes end |
#unique(*attributes) ⇒ Object
26 27 28 |
# File 'lib/ki/modules/restrictions.rb', line 26 def unique(*attributes) generic_restriction :unique_attributes, attributes end |
#unique_attributes ⇒ Object
22 23 24 |
# File 'lib/ki/modules/restrictions.rb', line 22 def unique_attributes [] end |