Class: Velocify::MessagePayload
- Inherits:
-
Object
- Object
- Velocify::MessagePayload
- Defined in:
- lib/velocify/payload.rb
Instance Method Summary collapse
- #authenticate(username:, password:) ⇒ Object
-
#initialize(msg) ⇒ MessagePayload
constructor
A new instance of MessagePayload.
- #render ⇒ Object
Constructor Details
#initialize(msg) ⇒ MessagePayload
Returns a new instance of MessagePayload.
5 6 7 |
# File 'lib/velocify/payload.rb', line 5 def initialize msg @msg = msg || {} end |
Instance Method Details
#authenticate(username:, password:) ⇒ Object
9 10 11 |
# File 'lib/velocify/payload.rb', line 9 def authenticate username:, password: @msg.merge!({ username: username, password: password }) end |
#render ⇒ Object
13 14 15 |
# File 'lib/velocify/payload.rb', line 13 def render { message: @msg } end |