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:



104
105
106
# File 'lib/declarative_authorization/reader.rb', line 104

def initialize (parent)
  @parent = parent
end

Instance Method Details

#authorization(&block) ⇒ Object



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

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

#contexts(&block) ⇒ Object



112
113
114
# File 'lib/declarative_authorization/reader.rb', line 112

def contexts (&block)
  # Not implemented
end

#privileges(&block) ⇒ Object



108
109
110
# File 'lib/declarative_authorization/reader.rb', line 108

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