Module: FeCoreExt::CoreExt::Pathname
- Included in:
- Pathname
- Defined in:
- lib/fe_core_ext/core_ext/pathname.rb
Instance Method Summary collapse
- #glob(pattern, &block) ⇒ Object
- #load_yaml ⇒ Object
- #mkdir_p ⇒ Object
- #require_relative ⇒ Object
- #rm(options = {}) ⇒ Object
- #touch(options = {}) ⇒ Object
Instance Method Details
#glob(pattern, &block) ⇒ Object
14 15 16 |
# File 'lib/fe_core_ext/core_ext/pathname.rb', line 14 def glob(pattern, &block) Pathname.glob(join(pattern), &block) end |
#load_yaml ⇒ Object
9 10 11 12 |
# File 'lib/fe_core_ext/core_ext/pathname.rb', line 9 def load_yaml return unless exist? YAML.load_file(self) end |
#mkdir_p ⇒ Object
26 27 28 29 |
# File 'lib/fe_core_ext/core_ext/pathname.rb', line 26 def mkdir_p mkpath self end |
#require_relative ⇒ Object
31 32 33 |
# File 'lib/fe_core_ext/core_ext/pathname.rb', line 31 def require_relative Kernel.require_relative(self) end |
#rm(options = {}) ⇒ Object
22 23 24 |
# File 'lib/fe_core_ext/core_ext/pathname.rb', line 22 def rm(={}) FileUtils.rm(self, ) end |
#touch(options = {}) ⇒ Object
18 19 20 |
# File 'lib/fe_core_ext/core_ext/pathname.rb', line 18 def touch(={}) FileUtils.touch(@path, ) end |