Module: JamfRubyExtensions::Pathname::Predicates
- Included in:
- Pathname
- Defined in:
- lib/jamf/ruby_extensions/pathname/predicates.rb
Instance Method Summary collapse
-
#j_include?(other) ⇒ Boolean
does a path include another? i.e.
-
#j_real_file? ⇒ Boolean
Is this a real file rather than a symlink?.
Instance Method Details
#j_include?(other) ⇒ Boolean
does a path include another? i.e. is 'other' a descendant of self ?
40 41 42 43 44 |
# File 'lib/jamf/ruby_extensions/pathname/predicates.rb', line 40 def j_include?(other) eps = .to_s oeps = other..to_s oeps != eps && oeps.start_with?(eps) end |
#j_real_file? ⇒ Boolean
Is this a real file rather than a symlink?
34 35 36 |
# File 'lib/jamf/ruby_extensions/pathname/predicates.rb', line 34 def j_real_file? FileTest.real_file? self end |