Class: DRbFileServer::FileX

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

Instance Method Summary collapse

Constructor Details

#initialize(path = '.') ⇒ FileX

Returns a new instance of FileX.



11
12
13
14
15
# File 'lib/drb_fileserver.rb', line 11

def initialize(path='.')
  
  @path = path
  
end

Instance Method Details

#read(filename) ⇒ Object



17
18
19
20
21
# File 'lib/drb_fileserver.rb', line 17

def read(filename)
  
  File.read File.join(@path, filename)
  
end

#write(filename, s) ⇒ Object



23
24
25
26
27
# File 'lib/drb_fileserver.rb', line 23

def write(filename, s)
  
  File.write File.join(@path, filename), s
  
end