Class: ConvertLoop::EventLog
- Inherits:
-
Object
- Object
- ConvertLoop::EventLog
- Defined in:
- lib/convertloop/event_log.rb
Instance Method Summary collapse
-
#initialize(client) ⇒ EventLog
constructor
A new instance of EventLog.
- #send(args = {}) ⇒ Object
Constructor Details
#initialize(client) ⇒ EventLog
Returns a new instance of EventLog.
3 4 5 6 |
# File 'lib/convertloop/event_log.rb', line 3 def initialize(client) raise RuntimeError, "No client provided" if client.nil? @client = client end |
Instance Method Details
#send(args = {}) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/convertloop/event_log.rb', line 8 def send(args={}) raise ArgumentError, "No args provided" if args.nil? raise ArgumentError, "No event name provided" if args[:name].nil? || args[:name].empty? @client.post("/event_logs", args) end |