Class: Deadlink::MdFiles
- Inherits:
-
Object
- Object
- Deadlink::MdFiles
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/deadlink/md_files.rb
Instance Method Summary collapse
- #find_by(path) ⇒ Object
-
#initialize(files) ⇒ MdFiles
constructor
A new instance of MdFiles.
Constructor Details
#initialize(files) ⇒ MdFiles
Returns a new instance of MdFiles.
10 11 12 |
# File 'lib/deadlink/md_files.rb', line 10 def initialize(files) @files = files end |
Instance Method Details
#find_by(path) ⇒ Object
14 15 16 17 |
# File 'lib/deadlink/md_files.rb', line 14 def find_by(path) @files.each { |file| return file if abs(file.path) == abs(path) } nil end |