Class: Fake::Path

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Path

Returns a new instance of Path.



6
7
8
# File 'lib/fake/path.rb', line 6

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/fake/path.rb', line 4

def path
  @path
end

Instance Method Details

#eql?(path_str) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
15
16
# File 'lib/fake/path.rb', line 10

def eql?(path_str)
  if dynamic?
    dynamic_paths_eql?(path_str)
  else
    path == path_str
  end
end