Method: Vfs::Entry#initialize
- Defined in:
- lib/vfs/entries/entry.rb
#initialize(*args) ⇒ Entry
Returns a new instance of Entry.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/vfs/entries/entry.rb', line 5 def initialize *args if args.size == 1 and args.first.is_a? Entry entry = args.first @path_cache = entry.path_cache @driver, @path = entry.driver, entry.path else driver, path = *args @path_cache = Path.new path @driver, @path = driver, path_cache.to_s end raise "driver not defined!" unless self.driver end |