class Posgra::DSL::Grants::Role::Schema::On

Attributes

result[R]

Public Class Methods

new(context, object, options, &block) click to toggle source
# File lib/posgra/dsl/grants/role/schema/on.rb, line 7
def initialize(context, object, options, &block)
  @object = object
  @options = options
  @context = context.merge(:object => object)
  @result = {}
  instance_eval(&block)
end

Public Instance Methods

grant(name, options = {}) click to toggle source
# File lib/posgra/dsl/grants/role/schema/on.rb, line 15
def grant(name, options = {})
  name = name.to_s

  @result[name] = {
    'is_grantable' => !!options[:grantable]
  }
end