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
-
#==(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.
35 36 37 38 39 40 |
# File 'lib/optimizely/event_builder.rb', line 35 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.
33 34 35 |
# File 'lib/optimizely/event_builder.rb', line 33 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)
Returns the value of attribute params.
31 32 33 |
# File 'lib/optimizely/event_builder.rb', line 31 def params @params end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
32 33 34 |
# File 'lib/optimizely/event_builder.rb', line 32 def url @url end |
Instance Method Details
#==(other) ⇒ Object
Override equality operator to make two events with the same contents equal for testing purposes
43 44 45 |
# File 'lib/optimizely/event_builder.rb', line 43 def ==(other) @http_verb == other.http_verb && @url == other.url && @params == other.params && @headers == other.headers end |