Class: RubySMB::Server::Share::Provider::Disk

Inherits:
Base
  • Object
show all
Defined in:
lib/ruby_smb/server/share/provider/disk.rb

Defined Under Namespace

Classes: Processor

Constant Summary collapse

TYPE =
TYPE_DISK

Instance Attribute Summary collapse

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#new_processor, #type

Constructor Details

#initialize(name, path) ⇒ Disk

Returns a new instance of Disk.

Raises:

  • (ArgumentError)


425
426
427
428
429
430
# File 'lib/ruby_smb/server/share/provider/disk.rb', line 425

def initialize(name, path)
  path = Pathname.new(File.expand_path(path))
  raise ArgumentError unless path.directory?
  @path = path
  super(name)
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



432
433
434
# File 'lib/ruby_smb/server/share/provider/disk.rb', line 432

def path
  @path
end