Class: Net::IMAP::ClientID
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: |
Net::IMAP::CommandData
|
Defined in: | lib/net/imap/command_data.rb |
Instance Method Summary
Instance Method Details
#format_internal(client_id) (private)
[ GitHub ]# File 'lib/net/imap/command_data.rb', line 277
def format_internal(client_id) return nil if client_id.nil? client_id.to_h.flat_map {|k,v| [StringFormatter.string(k), StringFormatter.nstring(v)] } end
#send_data(imap, tag)
[ GitHub ]# File 'lib/net/imap/command_data.rb', line 257
def send_data(imap, tag) imap.__send__(:send_data, format_internal(data), tag) end
#validate
[ GitHub ]# File 'lib/net/imap/command_data.rb', line 261
def validate validate_internal(data) end
#validate_internal(client_id) (private)
[ GitHub ]# File 'lib/net/imap/command_data.rb', line 267
def validate_internal(client_id) client_id.to_h.each do |k,v| unless StringFormatter.valid_string?(k) raise DataFormatError, client_id.inspect end end rescue NoMethodError, TypeError # to_h failed raise DataFormatError, client_id.inspect end