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:



115
116
117
# File 'lib/declarative_authorization/reader.rb', line 115

def initialize(parent)
  @parent = parent
end

Instance Method Details

#authorization(&block) ⇒ Object



127
128
129
# File 'lib/declarative_authorization/reader.rb', line 127

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

#contexts(&block) ⇒ Object



123
124
125
# File 'lib/declarative_authorization/reader.rb', line 123

def contexts(&block)
  # Not implemented
end

#privileges(&block) ⇒ Object



119
120
121
# File 'lib/declarative_authorization/reader.rb', line 119

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