Class: KodiClient::KodiOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/kodi_client/kodi_options.rb

Overview

holds all options like ip, port, credentials

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeKodiOptions

Returns a new instance of KodiOptions.



9
10
11
# File 'lib/kodi_client/kodi_options.rb', line 9

def initialize
  @tls = false
end

Instance Attribute Details

#ipObject

Returns the value of attribute ip.



7
8
9
# File 'lib/kodi_client/kodi_options.rb', line 7

def ip
  @ip
end

#passwordObject

Returns the value of attribute password.



7
8
9
# File 'lib/kodi_client/kodi_options.rb', line 7

def password
  @password
end

#portObject

Returns the value of attribute port.



7
8
9
# File 'lib/kodi_client/kodi_options.rb', line 7

def port
  @port
end

#tlsObject

Returns the value of attribute tls.



7
8
9
# File 'lib/kodi_client/kodi_options.rb', line 7

def tls
  @tls
end

#usernameObject

Returns the value of attribute username.



7
8
9
# File 'lib/kodi_client/kodi_options.rb', line 7

def username
  @username
end

Instance Method Details

#with_auth(username, password) ⇒ Object



18
19
20
21
# File 'lib/kodi_client/kodi_options.rb', line 18

def with_auth(username, password)
  @username = username
  @password = password
end

#with_connection(ip, port) ⇒ Object



13
14
15
16
# File 'lib/kodi_client/kodi_options.rb', line 13

def with_connection(ip, port)
  @ip = ip
  @port = port
end

#with_tls(enabled: true) ⇒ Object



23
24
25
# File 'lib/kodi_client/kodi_options.rb', line 23

def with_tls(enabled: true)
  @tls = enabled
end