Class: NFS::Server
- Inherits:
-
Object
- Object
- NFS::Server
- Defined in:
- lib/nfs/server.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#protocol ⇒ Object
readonly
Returns the value of attribute protocol.
Instance Method Summary collapse
-
#initialize(dir:, host:, port:, protocol:) ⇒ Server
constructor
A new instance of Server.
- #join ⇒ Object
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize(dir:, host:, port:, protocol:) ⇒ Server
Returns a new instance of Server.
5 6 7 8 9 10 11 12 13 |
# File 'lib/nfs/server.rb', line 5 def initialize(dir:, host:, port:, protocol:) @dir = dir @host = host @port = port @protocol = protocol @handler = Handler.new(FileProxy.new(dir)) @server = server_class.new(@handler.programs, port, host) end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
3 4 5 |
# File 'lib/nfs/server.rb', line 3 def dir @dir end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
3 4 5 |
# File 'lib/nfs/server.rb', line 3 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
3 4 5 |
# File 'lib/nfs/server.rb', line 3 def port @port end |
#protocol ⇒ Object (readonly)
Returns the value of attribute protocol.
3 4 5 |
# File 'lib/nfs/server.rb', line 3 def protocol @protocol end |
Instance Method Details
#join ⇒ Object
15 16 17 |
# File 'lib/nfs/server.rb', line 15 def join @server.join end |
#shutdown ⇒ Object
23 24 25 |
# File 'lib/nfs/server.rb', line 23 def shutdown @server.shutdown end |
#start ⇒ Object
19 20 21 |
# File 'lib/nfs/server.rb', line 19 def start @server.start end |