Class: Userlist::Push::Event
- Defined in:
- lib/userlist/push/event.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Event
constructor
A new instance of Event.
Methods inherited from Resource
endpoint, resource_name, #respond_to_missing?
Constructor Details
#initialize(attributes = {}) ⇒ Event
Returns a new instance of Event.
4 5 6 7 8 9 10 11 12 |
# File 'lib/userlist/push/event.rb', line 4 def initialize(attributes = {}) raise ArgumentError, 'Missing required attributes hash' unless attributes raise ArgumentError, 'Missing required parameter :name' unless attributes[:name] raise ArgumentError, 'Missing required parameter :user' unless attributes[:user] attributes[:occured_at] ||= Time.now super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Userlist::Push::Resource