Class: RailsSpotlight::AppRequest

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ AppRequest

Returns a new instance of AppRequest.



7
8
9
10
# File 'lib/rails_spotlight/app_request.rb', line 7

def initialize(id)
  @id = id
  @events = []
end

Instance Attribute Details

#eventsObject (readonly)

Returns the value of attribute events.



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

def events
  @events
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

Class Method Details

.currentObject



12
13
14
# File 'lib/rails_spotlight/app_request.rb', line 12

def self.current
  Thread.current[:rails_spotlight_request_id]
end

Instance Method Details

#current!Object



16
17
18
# File 'lib/rails_spotlight/app_request.rb', line 16

def current!
  Thread.current[:rails_spotlight_request_id] = self
end