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

#initialize(engine) ⇒ AbstractAnalyzer

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

#engineObject (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

#rolesObject



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

def roles
  AnalyzerEngine.roles(engine)
end

#rulesObject



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

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