Sha256: 52dace5510d48e5ac95ae96d638a397b0173ddcaa7661139675c1765240105aa

Contents?: true

Size: 465 Bytes

Versions: 14

Compression:

Stored size: 465 Bytes

Contents

class Posgra::DSL::Grants::Role::Schema::On
  include Posgra::Logger::Helper
  include Posgra::TemplateHelper

  attr_reader :result

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

  def grant(name, options = {})
    name = name.to_s

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

Version data entries

14 entries across 14 versions & 1 rubygems

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