Class: Raz::FileEntry

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, absolute_path) ⇒ FileEntry

Returns a new instance of FileEntry.



126
127
128
129
# File 'lib/raz/entries.rb', line 126

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

Instance Attribute Details

#absolute_pathObject (readonly)

Returns the value of attribute absolute_path.



124
125
126
# File 'lib/raz/entries.rb', line 124

def absolute_path
  @absolute_path
end

#nameObject (readonly)

Returns the value of attribute name.



122
123
124
# File 'lib/raz/entries.rb', line 122

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



131
132
133
134
135
136
137
# File 'lib/raz/entries.rb', line 131

def ==(other)
  absolute_path == if other.is_a?(FileEntry)
                     other.absolute_path
                   else
                     other.to_s
                   end
end