Class: Optimizely::EventContext
- Inherits:
-
Object
- Object
- Optimizely::EventContext
- Defined in:
- lib/optimizely/event/entity/event_context.rb
Instance Attribute Summary collapse
-
#account_id ⇒ Object
readonly
Returns the value of attribute account_id.
-
#anonymize_ip ⇒ Object
readonly
Returns the value of attribute anonymize_ip.
-
#client_name ⇒ Object
readonly
Returns the value of attribute client_name.
-
#client_version ⇒ Object
readonly
Returns the value of attribute client_version.
-
#project_id ⇒ Object
readonly
Returns the value of attribute project_id.
-
#revision ⇒ Object
readonly
Returns the value of attribute revision.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(account_id:, project_id:, anonymize_ip:, revision:, client_name:, client_version:) ⇒ EventContext
constructor
A new instance of EventContext.
Constructor Details
#initialize(account_id:, project_id:, anonymize_ip:, revision:, client_name:, client_version:) ⇒ EventContext
Returns a new instance of EventContext.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/optimizely/event/entity/event_context.rb', line 23 def initialize( account_id:, project_id:, anonymize_ip:, revision:, client_name:, client_version: ) @account_id = account_id @project_id = project_id @anonymize_ip = anonymize_ip @revision = revision @client_name = client_name @client_version = client_version end |
Instance Attribute Details
#account_id ⇒ Object (readonly)
Returns the value of attribute account_id.
20 21 22 |
# File 'lib/optimizely/event/entity/event_context.rb', line 20 def account_id @account_id end |
#anonymize_ip ⇒ Object (readonly)
Returns the value of attribute anonymize_ip.
20 21 22 |
# File 'lib/optimizely/event/entity/event_context.rb', line 20 def anonymize_ip @anonymize_ip end |
#client_name ⇒ Object (readonly)
Returns the value of attribute client_name.
20 21 22 |
# File 'lib/optimizely/event/entity/event_context.rb', line 20 def client_name @client_name end |
#client_version ⇒ Object (readonly)
Returns the value of attribute client_version.
20 21 22 |
# File 'lib/optimizely/event/entity/event_context.rb', line 20 def client_version @client_version end |
#project_id ⇒ Object (readonly)
Returns the value of attribute project_id.
20 21 22 |
# File 'lib/optimizely/event/entity/event_context.rb', line 20 def project_id @project_id end |
#revision ⇒ Object (readonly)
Returns the value of attribute revision.
20 21 22 |
# File 'lib/optimizely/event/entity/event_context.rb', line 20 def revision @revision end |
Instance Method Details
#as_json ⇒ Object
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/optimizely/event/entity/event_context.rb', line 39 def as_json { account_id: @account_id, project_id: @project_id, anonymize_ip: @anonymize_ip, revision: @revision, client_name: @client_name, client_version: @client_version } end |