Class: Authorization::Reader::DSLReader::DSLMethods

Inherits:
Object
  • Object
show all
Defined in:
lib/declarative_authorization/reader.rb

Overview

DSL methods

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ DSLMethods

:nodoc:



78
79
80
# File 'lib/declarative_authorization/reader.rb', line 78

def initialize (parent)
  @parent = parent
end

Instance Method Details

#authorization(&block) ⇒ Object



90
91
92
# File 'lib/declarative_authorization/reader.rb', line 90

def authorization (&block)
  @parent.auth_rules_reader.instance_eval(&block)
end

#contexts(&block) ⇒ Object



86
87
88
# File 'lib/declarative_authorization/reader.rb', line 86

def contexts (&block)
  # Not implemented
end

#privileges(&block) ⇒ Object



82
83
84
# File 'lib/declarative_authorization/reader.rb', line 82

def privileges (&block)
  @parent.privileges_reader.instance_eval(&block)
end