Class: PostgresPR::PasswordMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/postgres-pr/message.rb

Constant Summary

Constants inherited from Message

Message::MsgTypeMap

Instance Method Summary collapse

Methods inherited from Message

create, dump, #parse, read, register_message_type

Constructor Details

#initialize(password) ⇒ PasswordMessage

Returns a new instance of PasswordMessage.



129
130
131
# File 'lib/postgres-pr/message.rb', line 129

def initialize(password)
  @password = password
end

Instance Method Details

#dumpObject



133
134
135
136
137
# File 'lib/postgres-pr/message.rb', line 133

def dump
  super(@password.size + 1) do |buffer|
    buffer.write_cstring(@password)
  end
end