Method: Pathname#child_of?
- Defined in:
- lib/ruber/utils.rb
#child_of?(other) ⇒ Boolean
Whether the pathname represents a file or directory under the directory represented by another pathname
can be parent of self
249 250 251 252 |
# File 'lib/ruber/utils.rb', line 249 def child_of? other other = Pathname.new(other) if other.is_a? String self.relative_path_from(other).to_s[0..2]!= '../' end |