Module: Tins::Find::PathExtension
- Defined in:
- lib/tins/find.rb
Instance Attribute Summary collapse
-
#finder ⇒ Object
Returns the value of attribute finder.
Instance Method Summary collapse
Instance Attribute Details
#finder ⇒ Object
Returns the value of attribute finder.
61 62 63 |
# File 'lib/tins/find.rb', line 61 def finder @finder end |
Instance Method Details
#file ⇒ Object
78 79 80 81 82 |
# File 'lib/tins/find.rb', line 78 def file if stat.file? File.new(self) end end |
#stat ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/tins/find.rb', line 63 def stat begin @stat ||= if finder.follow_symlinks File.stat(self) else File.lstat(self) end rescue EXPECTED_STANDARD_ERRORS if finder.raise_errors raise end end end |