lib/gratan/dsl/context/on.rb in gratan-0.2.9 vs lib/gratan/dsl/context/on.rb in gratan-0.3.0.beta

- old
+ new

@@ -1,15 +1,17 @@ class Gratan::DSL::Context::On include Gratan::DSL::Validator + include Gratan::TemplateHelper attr_reader :result - def initialize(user, host, object, options, &block) + def initialize(context, user, host, object, options, &block) @object_identifier = "User `#{user}@#{host}` on `#{object}`" @user = user @host = host @object = object @options = options + @context = context.merge(:object => object, :grant_options => options) @result = [] instance_eval(&block) end def grant(name, options = {})