Class: RailsSpotlight::AppRequest
- Inherits:
-
Object
- Object
- RailsSpotlight::AppRequest
- Defined in:
- lib/rails_spotlight/app_request.rb
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
- #current! ⇒ Object
-
#initialize(id) ⇒ AppRequest
constructor
A new instance of AppRequest.
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
#events ⇒ Object (readonly)
Returns the value of attribute events.
5 6 7 |
# File 'lib/rails_spotlight/app_request.rb', line 5 def events @events end |
#id ⇒ Object (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
.current ⇒ Object
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 |