Module: CleanRoom::AirLock::Parameters
- Defined in:
- lib/clean_room/air_lock.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/clean_room/air_lock.rb', line 4 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#params ⇒ Object
8 9 10 |
# File 'lib/clean_room/air_lock.rb', line 8 def params @_params ||= HashWithIndifferentAccess.new(CleanRoom::Filter.clean(request.parameters, nested_rules: self.class.cr_rules)) end |
#params=(val) ⇒ Object
12 13 14 |
# File 'lib/clean_room/air_lock.rb', line 12 def params=(val) @_params = val.is_a?(Hash) ? HashWithIndifferentAccess.new(CleanRoom::Filter.clean(val, nested_rules: self.class.cr_rules)) : val end |