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

- (DSLMethods) initialize(parent)

:nodoc:



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

def initialize (parent)
  @parent = parent
end

Instance Method Details

- (Object) authorization(&block)



129
130
131
# File 'lib/declarative_authorization/reader.rb', line 129

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

- (Object) contexts(&block)



125
126
127
# File 'lib/declarative_authorization/reader.rb', line 125

def contexts (&block)
  # Not implemented
end

- (Object) privileges(&block)



121
122
123
# File 'lib/declarative_authorization/reader.rb', line 121

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