Class: SoarAspects::Aspects

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

Constant Summary collapse

@@configuration =
nil
@@signed_routes =
nil
@@auditing =
nil

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Aspects

Returns a new instance of Aspects.



35
36
37
# File 'lib/soar_aspects.rb', line 35

def initialize(app)
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



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

def app
  @app
end

Class Method Details

.auditingObject



31
32
33
# File 'lib/soar_aspects.rb', line 31

def self.auditing
  @@auditing
end

.auditing=(auditing) ⇒ Object



27
28
29
# File 'lib/soar_aspects.rb', line 27

def self.auditing=(auditing)
  @@auditing = auditing
end

.configurationObject



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

def self.configuration
  @@configuration
end

.configuration=(configuration) ⇒ Object



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

def self.configuration=(configuration)
  @@configuration = configuration
end

.signed_routesObject



23
24
25
# File 'lib/soar_aspects.rb', line 23

def self.signed_routes
  @@signed_routes
end

.signed_routes=(signed_routes) ⇒ Object



19
20
21
# File 'lib/soar_aspects.rb', line 19

def self.signed_routes=(signed_routes)
  @@signed_routes = signed_routes
end

Instance Method Details

#call(env) ⇒ Object



39
40
41
42
43
44
# File 'lib/soar_aspects.rb', line 39

def call(env)
  env['configuration'] = @@configuration
  env['signed_routes'] = @@signed_routes
  env['auditing'] = @@auditing
  @app.call(env)
end