Class: KodiClient::KodiOptions
- Inherits:
-
Object
- Object
- KodiClient::KodiOptions
- Defined in:
- lib/kodi_client/kodi_options.rb
Overview
holds all options like ip, port, credentials
Instance Attribute Summary collapse
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#tls ⇒ Object
Returns the value of attribute tls.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ KodiOptions
constructor
A new instance of KodiOptions.
- #with_auth(username, password) ⇒ Object
- #with_connection(ip, port) ⇒ Object
- #with_tls(enabled: true) ⇒ Object
Constructor Details
#initialize ⇒ KodiOptions
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
#ip ⇒ Object
Returns the value of attribute ip.
7 8 9 |
# File 'lib/kodi_client/kodi_options.rb', line 7 def ip @ip end |
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/kodi_client/kodi_options.rb', line 7 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
7 8 9 |
# File 'lib/kodi_client/kodi_options.rb', line 7 def port @port end |
#tls ⇒ Object
Returns the value of attribute tls.
7 8 9 |
# File 'lib/kodi_client/kodi_options.rb', line 7 def tls @tls end |
#username ⇒ Object
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 |