Module: Ki::Model::Restrictions

Included in:
Ki::Model
Defined in:
lib/ki/modules/restrictions.rb

Instance Method Summary collapse

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_actionsObject



4
5
6
# File 'lib/ki/modules/restrictions.rb', line 4

def forbidden_actions
  []
end

#required_attributesObject



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_attributesObject



20
21
22
# File 'lib/ki/modules/restrictions.rb', line 20

def unique_attributes
  []
end