Sha256: 3910dc580168feb721c660ff1d2c5addcadefc1494307c8f4f7b45646e0d703d

Contents?: true

Size: 581 Bytes

Versions: 14

Compression:

Stored size: 581 Bytes

Contents

class Posgra::DSL::Grants::Role
  include Posgra::Logger::Helper
  include Posgra::TemplateHelper
  include Posgra::Utils::Helper

  attr_reader :result

  def initialize(context, role, options, &block)
    @role = role
    @options = options
    @context = context.merge(:role => role)
    @result = {}
    instance_eval(&block)
  end

  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
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
posgra-0.2.3.beta lib/posgra/dsl/grants/role.rb
posgra-0.2.2 lib/posgra/dsl/grants/role.rb
posgra-0.2.1 lib/posgra/dsl/grants/role.rb
posgra-0.2.0 lib/posgra/dsl/grants/role.rb
posgra-0.1.9 lib/posgra/dsl/grants/role.rb
posgra-0.1.8 lib/posgra/dsl/grants/role.rb
posgra-0.1.7 lib/posgra/dsl/grants/role.rb
posgra-0.1.6 lib/posgra/dsl/grants/role.rb
posgra-0.1.5 lib/posgra/dsl/grants/role.rb
posgra-0.1.4 lib/posgra/dsl/grants/role.rb
posgra-0.1.3 lib/posgra/dsl/grants/role.rb
posgra-0.1.2 lib/posgra/dsl/grants/role.rb
posgra-0.1.1 lib/posgra/dsl/grants/role.rb
posgra-0.1.0 lib/posgra/dsl/grants/role.rb