Class: FuzzyFileFinder::FileSystemEntry

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

Overview

Used internally to represent a file within the directory tree.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent, name) ⇒ FileSystemEntry

Returns a new instance of FileSystemEntry.



68
69
70
71
# File 'lib/fuzzy_file_finder.rb', line 68

def initialize(parent, name)
  @parent = parent
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



66
67
68
# File 'lib/fuzzy_file_finder.rb', line 66

def name
  @name
end

#parentObject (readonly)

:nodoc:



65
66
67
# File 'lib/fuzzy_file_finder.rb', line 65

def parent
  @parent
end

Instance Method Details

#pathObject



73
74
75
# File 'lib/fuzzy_file_finder.rb', line 73

def path
  File.join(parent.name, name)
end