Module: Protector::DSL::Base

Extended by:
ActiveSupport::Concern
Defined in:
lib/protector/dsl.rb

Instance Method Summary collapse

Instance Method Details

#restrict!(subject) ⇒ Object

Assigns restriction subject

Parameters:

  • subject (Object)

    Subject to restrict against



218
219
220
221
# File 'lib/protector/dsl.rb', line 218

def restrict!(subject)
  @protector_subject = subject
  self
end

#unrestrict!Object

Clears restriction subject



224
225
226
227
# File 'lib/protector/dsl.rb', line 224

def unrestrict!
  @protector_subject = nil
  self
end