Class: NetworkProjector::NPConnection
- Inherits:
-
Object
- Object
- NetworkProjector::NPConnection
- Defined in:
- lib/network-projector/server/app.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#passwd ⇒ Object
readonly
Returns the value of attribute passwd.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ NPConnection
constructor
A new instance of NPConnection.
- #run ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ NPConnection
Returns a new instance of NPConnection.
10 11 12 13 14 15 16 17 |
# File 'lib/network-projector/server/app.rb', line 10 def initialize = {} @id = UUID.generate @label = [:label] @host = [:host] @port = [:port] @passwd = [:passwd] @client = VncClient.new end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
8 9 10 |
# File 'lib/network-projector/server/app.rb', line 8 def client @client end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
8 9 10 |
# File 'lib/network-projector/server/app.rb', line 8 def host @host end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/network-projector/server/app.rb', line 8 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
8 9 10 |
# File 'lib/network-projector/server/app.rb', line 8 def label @label end |
#passwd ⇒ Object (readonly)
Returns the value of attribute passwd.
8 9 10 |
# File 'lib/network-projector/server/app.rb', line 8 def passwd @passwd end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
8 9 10 |
# File 'lib/network-projector/server/app.rb', line 8 def port @port end |
Instance Method Details
#run ⇒ Object
23 24 25 |
# File 'lib/network-projector/server/app.rb', line 23 def run @client.run :host => @host, :port => @port, :passwd => @passwd end |
#status ⇒ Object
19 20 21 |
# File 'lib/network-projector/server/app.rb', line 19 def status @client.started? ? "Started" : "Stopped" end |