Class: Plex::Server
- Inherits:
-
Object
- Object
- Plex::Server
- Defined in:
- lib/plex-ruby/server.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#clients ⇒ Array
The Plex clients that are connected to this Server.
-
#clients! ⇒ Object
Cache busting version of #clients.
-
#initialize(host, port) ⇒ Server
constructor
A new instance of Server.
- #inspect ⇒ Object
-
#library ⇒ Library
The library of this server.
- #url ⇒ Object
Constructor Details
#initialize(host, port) ⇒ Server
Returns a new instance of Server.
6 7 8 9 |
# File 'lib/plex-ruby/server.rb', line 6 def initialize(host, port) @host = host @port = port end |
Instance Attribute Details
#host ⇒ Object (readonly)
Returns the value of attribute host.
4 5 6 |
# File 'lib/plex-ruby/server.rb', line 4 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
4 5 6 |
# File 'lib/plex-ruby/server.rb', line 4 def port @port end |
Instance Method Details
#clients ⇒ Array
The Plex clients that are connected to this Server
21 22 23 |
# File 'lib/plex-ruby/server.rb', line 21 def clients @clients ||= search_clients clients_doc end |
#clients! ⇒ Object
Cache busting version of #clients
26 27 28 |
# File 'lib/plex-ruby/server.rb', line 26 def clients! @clients = search_clients clients_doc! end |
#inspect ⇒ Object
36 37 38 |
# File 'lib/plex-ruby/server.rb', line 36 def inspect #:nodoc: "#<Plex::Server: host=#{host} port=#{port}>" end |
#library ⇒ Library
The library of this server
14 15 16 |
# File 'lib/plex-ruby/server.rb', line 14 def library @library ||= Plex::Library.new(self) end |
#url ⇒ Object
31 32 33 |
# File 'lib/plex-ruby/server.rb', line 31 def url #:nodoc: "http://#{host}:#{port}" end |