class Posgra::DSL::Database::Role::Database

Attributes

result[R]

Public Class Methods

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

Public Instance Methods

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

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