How to get Convenient Service root folder?
Call
ConvenientService.rootto get the gem's installation directory as aPathname.ConvenientService.root # => #<Pathname:/path/to/gems/convenient_service-1.0.0>Since the returned value is a
Pathname, all standard path operations are available.ConvenientService.root.join("lib", "convenient_service.rb") # => #<Pathname:/path/to/gems/convenient_service-1.0.0/lib/convenient_service.rb> ConvenientService.root.join("lib", "convenient_service.rb").exist? # => trueConvenientService.rootis inspired byRails.root.