Class: LittleBlueFox::Event
- Inherits:
-
Object
- Object
- LittleBlueFox::Event
- Defined in:
- lib/littlebluefox/event.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#event_type ⇒ Object
Returns the value of attribute event_type.
-
#http_headers ⇒ Object
Returns the value of attribute http_headers.
-
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
-
#uref ⇒ Object
Returns the value of attribute uref.
Instance Method Summary collapse
-
#initialize(event_type, uref, email, remote_ip, http_headers) ⇒ Event
constructor
A new instance of Event.
- #to_json ⇒ Object
Constructor Details
#initialize(event_type, uref, email, remote_ip, http_headers) ⇒ Event
Returns a new instance of Event.
11 12 13 |
# File 'lib/littlebluefox/event.rb', line 11 def initialize(event_type, uref, email, remote_ip, http_headers) @event_type, @uref, @email, @remote_ip, @http_headers = event_type, uref, email, remote_ip, http_headers end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
5 6 7 |
# File 'lib/littlebluefox/event.rb', line 5 def email @email end |
#event_type ⇒ Object
Returns the value of attribute event_type.
5 6 7 |
# File 'lib/littlebluefox/event.rb', line 5 def event_type @event_type end |
#http_headers ⇒ Object
Returns the value of attribute http_headers.
5 6 7 |
# File 'lib/littlebluefox/event.rb', line 5 def http_headers @http_headers end |
#remote_ip ⇒ Object
Returns the value of attribute remote_ip.
5 6 7 |
# File 'lib/littlebluefox/event.rb', line 5 def remote_ip @remote_ip end |
#uref ⇒ Object
Returns the value of attribute uref.
5 6 7 |
# File 'lib/littlebluefox/event.rb', line 5 def uref @uref end |
Instance Method Details
#to_json ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/littlebluefox/event.rb', line 15 def to_json JSON.dump({ event_type: event_type, uref: uref, email: email, remote_ip: remote_ip, http_headers: normalized_http_headers, }) end |