Sha256: efd1019025717869c9df67f7e60beb4cd392b8faba5f1ae09e7ff44f06ee221b

Contents?: true

Size: 593 Bytes

Versions: 4

Compression:

Stored size: 593 Bytes

Contents

class Posgra::DSL::Database::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 database(name, &block)
    name = name.to_s

    if matched?(name, @options[:include_database], @options[:exclude_database])
      @result[name] = Posgra::DSL::Database::Role::Database.new(@context, name, @options, &block).result
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
posgra-0.2.3.beta lib/posgra/dsl/database/role.rb
posgra-0.2.2 lib/posgra/dsl/database/role.rb
posgra-0.2.1 lib/posgra/dsl/database/role.rb
posgra-0.2.0 lib/posgra/dsl/database/role.rb