Class: Pathname
Instance Method Summary (collapse)
-
- (Boolean) child_of?(other)
Whether the pathname represents a file or directory under the directory represented by another pathname.
Instance Method Details
- (Boolean) child_of?(other)
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 |