Module: JamfRubyExtensions::Pathname::Predicates
- Included in:
- Pathname
- Defined in:
- lib/jamf/ruby_extensions/pathname/predicates.rb
Instance Method Summary collapse
-
#j_include?(other) ⇒ Boolean
(also: #jss_include?)
does a path include another? i.e.
-
#j_real_file? ⇒ Boolean
(also: #jss_real_file?)
Is this a real file rather than a symlink?.
Instance Method Details
#j_include?(other) ⇒ Boolean Also known as: jss_include?
does a path include another? i.e. is ‘other’ a descendant of self ?
41 42 43 44 45 |
# File 'lib/jamf/ruby_extensions/pathname/predicates.rb', line 41 def j_include?(other) eps = .to_s oeps = other..to_s oeps != eps && oeps.start_with?(eps) end |
#j_real_file? ⇒ Boolean Also known as: jss_real_file?
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 |