Method: Masks::Access::ClassMethods#access
- Defined in:
- app/models/concerns/masks/access.rb
#access(name, **opts) ⇒ nil
Registers the class by the supplied name.
Any opts provided will be used as defaults for instances, in addition to the data supplied in the app’s configuration.
This can be called multiple times. If names are the same, opts will be deep merged together. Different names can be supplied as well.
115 116 117 118 119 120 121 |
# File 'app/models/concerns/masks/access.rb', line 115 def access(name, **opts) @access_name = name Masks::Access.register(access_name, **opts.merge(cls: self)) nil end |