Class: AccessSchema::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/access_schema/proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(schema, options = {}) ⇒ Proxy

Returns a new instance of Proxy.



4
5
6
7
# File 'lib/access_schema/proxy.rb', line 4

def initialize(schema, options = {})
  @schema = schema
  @options = options
end

Instance Method Details

#allow?(*args) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/access_schema/proxy.rb', line 13

def allow?(*args)
  @schema.allow?(*normalize_args(args))
end

#require!(*args) ⇒ Object



17
18
19
# File 'lib/access_schema/proxy.rb', line 17

def require!(*args)
  @schema.require!(*normalize_args(args))
end

#rolesObject



9
10
11
# File 'lib/access_schema/proxy.rb', line 9

def roles
  @schema.roles
end

#with_options(options) ⇒ Object



21
22
23
# File 'lib/access_schema/proxy.rb', line 21

def with_options(options)
  Proxy.new(self, options)
end