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
Returns a new instance of Event.
14 15 16 17 18 19 |
# File 'lib/optimizely/event_builder.rb', line 14 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.
12 13 14 |
# File 'lib/optimizely/event_builder.rb', line 12 def headers @headers end |
#http_verb ⇒ Object (readonly)
Representation of an event which can be sent to the Optimizely logging endpoint.
9 10 11 |
# File 'lib/optimizely/event_builder.rb', line 9 def http_verb @http_verb end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
10 11 12 |
# File 'lib/optimizely/event_builder.rb', line 10 def params @params end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
11 12 13 |
# File 'lib/optimizely/event_builder.rb', line 11 def url @url end |
Instance Method Details
#==(event) ⇒ Object
Override equality operator to make two events with the same contents equal for testing purposes
22 23 24 |
# File 'lib/optimizely/event_builder.rb', line 22 def ==(event) @http_verb == event.http_verb && @url == event.url && @params == event.params && @headers == event.headers end |