Class: Optimizely::Event
- Inherits:
-
Object
- Object
- Optimizely::Event
- Defined in:
- lib/optimizely/event_builder.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Representation of an event which can be sent to the Optimizely logging endpoint.
-
#http_verb ⇒ Object
readonly
Representation of an event which can be sent to the Optimizely logging endpoint.
-
#params ⇒ Object
readonly
Representation of an event which can be sent to the Optimizely logging endpoint.
-
#url ⇒ Object
readonly
Representation of an event which can be sent to the Optimizely logging endpoint.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Override equality operator to make two events with the same contents equal for testing purposes.
-
#initialize(http_verb, url, params, headers) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(http_verb, url, params, headers) ⇒ Event
Returns a new instance of Event.
32 33 34 35 36 37 |
# File 'lib/optimizely/event_builder.rb', line 32 def initialize(http_verb, url, params, headers) @http_verb = http_verb @url = url @params = params @headers = headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Representation of an event which can be sent to the Optimizely logging endpoint.
30 31 32 |
# File 'lib/optimizely/event_builder.rb', line 30 def headers @headers end |
#http_verb ⇒ Object (readonly)
Representation of an event which can be sent to the Optimizely logging endpoint.
30 31 32 |
# File 'lib/optimizely/event_builder.rb', line 30 def http_verb @http_verb end |
#params ⇒ Object (readonly)
Representation of an event which can be sent to the Optimizely logging endpoint.
30 31 32 |
# File 'lib/optimizely/event_builder.rb', line 30 def params @params end |
#url ⇒ Object (readonly)
Representation of an event which can be sent to the Optimizely logging endpoint.
30 31 32 |
# File 'lib/optimizely/event_builder.rb', line 30 def url @url end |
Instance Method Details
#==(other) ⇒ Object
Override equality operator to make two events with the same contents equal for testing purposes
40 41 42 |
# File 'lib/optimizely/event_builder.rb', line 40 def ==(other) @http_verb == other.http_verb && @url == other.url && @params == other.params && @headers == other.headers end |