class Posgra::DSL::Grants::Role

Attributes

result[R]

Public Class Methods

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

Public Instance Methods

schema(name, &block) click to toggle source
# File lib/posgra/dsl/grants/role.rb, line 16
def schema(name, &block)
  name = name.to_s

  if matched?(name, @options[:include_schema], @options[:exclude_schema])
    @result[name] = Posgra::DSL::Grants::Role::Schema.new(@context, name, @options, &block).result
  end
end