Class: Velocify::MessagePayload

Inherits:
Object
  • Object
show all
Defined in:
lib/velocify/payload.rb

Instance Method Summary collapse

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

#renderObject



13
14
15
# File 'lib/velocify/payload.rb', line 13

def render
  { message: @msg }
end