Class: Klomp::Frames::Connect

Inherits:
Frame
  • Object
show all
Defined in:
lib/klomp/frames.rb

Instance Method Summary collapse

Methods inherited from Frame

#[], #[]=, #body, #body=, #dump_headers, #headers, #name, #new_headers, #stringify_headers, #to_s

Constructor Details

#initialize(options) ⇒ Connect

Returns a new instance of Connect.



78
79
80
81
82
83
84
# File 'lib/klomp/frames.rb', line 78

def initialize(options)
  headers['accept-version'] = '1.1'
  headers['host'] = options['host'] if options['host']
  headers['heart-beat'] = "0,0"
  headers['login'] = options['login'] if options['login']
  headers['passcode'] = options['passcode'] if options['passcode']
end