Class: Rushover::User
- Inherits:
-
Object
- Object
- Rushover::User
- Defined in:
- lib/rushover.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key, client) ⇒ User
constructor
A new instance of User.
- #notify(message, options = {}) ⇒ Object
- #validate(device = nil) ⇒ Object
- #validate!(device = nil) ⇒ Object
Constructor Details
#initialize(key, client) ⇒ User
Returns a new instance of User.
68 69 70 71 |
# File 'lib/rushover.rb', line 68 def initialize(key, client) @key = key @client = client end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
66 67 68 |
# File 'lib/rushover.rb', line 66 def client @client end |
#key ⇒ Object
Returns the value of attribute key.
66 67 68 |
# File 'lib/rushover.rb', line 66 def key @key end |
Instance Method Details
#notify(message, options = {}) ⇒ Object
73 74 75 |
# File 'lib/rushover.rb', line 73 def notify(, = {}) client.notify(key, , ) end |
#validate(device = nil) ⇒ Object
77 78 79 |
# File 'lib/rushover.rb', line 77 def validate(device = nil) client.validate(key, device) end |
#validate!(device = nil) ⇒ Object
81 82 83 |
# File 'lib/rushover.rb', line 81 def validate!(device = nil) validate(device).ok? end |