Method: Mastodon::Streaming::Client#initialize

Defined in:
lib/mastodon/streaming/client.rb

#initialize(options = {}) ⇒ Mastodon::Streaming::Client

Initializes a new Client object

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :tcp_socket_class (String)

    A class that Connection will use to create a new TCP socket.

  • :ssl_socket_class (String)

    A class that Connection will use to create a new SSL socket.



18
19
20
21
22
# File 'lib/mastodon/streaming/client.rb', line 18

def initialize(options = {})
  super
  options[:using_ssl] ||= base_url =~ /^https/
  @connection = Streaming::Connection.new(options)
end