Method: Path.like?
- Defined in:
- lib/path/identity.rb
.like?(object) ⇒ Boolean
Whether object looks like a path. The current test checks if the object responds to #to_path, #path or #to_str.
25 26 27 |
# File 'lib/path/identity.rb', line 25 def like? object [:to_path, :path, :to_str].any? { |meth| object.respond_to? meth } end |