Method: Masks.access

Defined in:
lib/masks.rb

.access(name, session, **_opts) ⇒ Masks::Access

Returns an access instance based on the type & session passed.

Parameters:

Returns:

Raises:

  • (Masks::Error::Unauthorized)

    if access cannot be granted to the session passed

  • (Masks::UnknownAccess)

    if the access type cannot be found



33
34
35
# File 'lib/masks.rb', line 33

def access(name, session, **_opts)
  configuration.access(name).fetch(:cls).build(session)
end