Class: Authorization::DevelopmentSupport::AbstractAnalyzer

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

Direct Known Subclasses

Analyzer, ChangeAnalyzer, ChangeSupporter

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (AbstractAnalyzer) initialize(engine)

Returns a new instance of AbstractAnalyzer



7
8
9
# File 'lib/declarative_authorization/development_support/development_support.rb', line 7

def initialize (engine)
  @engine = engine
end

Instance Attribute Details

- (Object) engine (readonly)

Returns the value of attribute engine



5
6
7
# File 'lib/declarative_authorization/development_support/development_support.rb', line 5

def engine
  @engine
end

Instance Method Details

- (Object) roles



11
12
13
# File 'lib/declarative_authorization/development_support/development_support.rb', line 11

def roles
  AnalyzerEngine.roles(engine)
end

- (Object) rules



15
16
17
# File 'lib/declarative_authorization/development_support/development_support.rb', line 15

def rules
  roles.collect {|role| role.rules }.flatten
end