Class: Optimizely::Event
- Inherits:
-
Object
- Object
- Optimizely::Event
- Defined in:
- lib/optimizely/event_builder.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#http_verb ⇒ Object
readonly
Representation of an event which can be sent to the Optimizely logging endpoint.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#==(event) ⇒ 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
30 31 32 33 34 35 |
# File 'lib/optimizely/event_builder.rb', line 30 def initialize(http_verb, url, params, headers) @http_verb = http_verb @url = url @params = params @headers = headers end |
Instance Attribute Details
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
28 29 30 |
# File 'lib/optimizely/event_builder.rb', line 28 def headers @headers end |
#http_verb ⇒ Object (readonly)
Representation of an event which can be sent to the Optimizely logging endpoint.
25 26 27 |
# File 'lib/optimizely/event_builder.rb', line 25 def http_verb @http_verb end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
26 27 28 |
# File 'lib/optimizely/event_builder.rb', line 26 def params @params end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
27 28 29 |
# File 'lib/optimizely/event_builder.rb', line 27 def url @url end |
Instance Method Details
#==(event) ⇒ Object
Override equality operator to make two events with the same contents equal for testing purposes
38 39 40 |
# File 'lib/optimizely/event_builder.rb', line 38 def ==(event) @http_verb == event.http_verb && @url == event.url && @params == event.params && @headers == event.headers end |