Module: LintFu::Mixins::FileClassMethods
- Included in:
- File
- Defined in:
- lib/lint_fu/mixins/file_class_methods.rb
Instance Method Summary collapse
Instance Method Details
#relative_path(base, path) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/lint_fu/mixins/file_class_methods.rb', line 4 def relative_path(base, path) base = File.(base) path = File.(path) raise Errno::ENOENT unless path.index(base) == 0 return path[base.length+1..-1] end |