markdown/readme/classes/file/simple/show.md in debug_helper-2.0.0 vs markdown/readme/classes/file/simple/show.md in debug_helper-2.1.0
- old
+ new
@@ -4,33 +4,38 @@
```show.rb```:
```ruby
require 'debug_helper'
-file = File.new(__FILE__)
-DebugHelper.show(file, 'My simple file')
+gem_file_path = `gem which debug_helper`.chomp
+gem_dir_path = File.dirname(gem_file_path)
+gem_file_name = File.basename(gem_file_path)
+Dir.chdir(gem_dir_path) do
+ file = File.new(gem_file_name)
+ DebugHelper.show(file, 'Gem file')
+end
```
The output shows details of the file.
```show.yaml```:
```yaml
---
-File (message='My simple file'):
- File.absolute_path("show.rb"): C:/Users/Burdette/Documents/GitHub/debug_helper/markdown/readme/classes/file/simple/show.rb
- File.atime("show.rb"): 2018-07-14 12:45:32.000000000 -05:00
- File.ctime("show.rb"): 2018-07-14 12:45:32.000000000 -05:00
- File.executable?("show.rb"): false
- File.exist?("show.rb"): true
- File.ftype("show.rb"): file
- File.mtime("show.rb"): 2018-07-14 12:45:32.000000000 -05:00
- File.path("show.rb"): show.rb
- File.pipe?("show.rb"): false
- File.readable?("show.rb"): true
- File.realpath("show.rb"): C:/Users/Burdette/Documents/GitHub/debug_helper/markdown/readme/classes/file/simple/show.rb
- File.setgid?("show.rb"): false
- File.setuid?("show.rb"): false
- File.size("show.rb"): 95
- File.socket?("show.rb"): false
- File.symlink?("show.rb"): false
- File.writable?("show.rb"): true
+File (message='Gem file'):
+ File.absolute_path("debug_helper.rb"): C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/debug_helper-2.0.0/lib/debug_helper.rb
+ File.atime("debug_helper.rb"): 2019-01-25 15:43:42.740298400 -06:00
+ File.ctime("debug_helper.rb"): 2019-01-25 15:43:42.740298400 -06:00
+ File.executable?("debug_helper.rb"): false
+ File.exist?("debug_helper.rb"): true
+ File.ftype("debug_helper.rb"): file
+ File.mtime("debug_helper.rb"): 2019-01-25 15:43:42.741296200 -06:00
+ File.path("debug_helper.rb"): debug_helper.rb
+ File.pipe?("debug_helper.rb"): false
+ File.readable?("debug_helper.rb"): true
+ File.realpath("debug_helper.rb"): C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/debug_helper-2.0.0/lib/debug_helper.rb
+ File.setgid?("debug_helper.rb"): false
+ File.setuid?("debug_helper.rb"): false
+ File.size("debug_helper.rb"): 3701
+ File.socket?("debug_helper.rb"): false
+ File.symlink?("debug_helper.rb"): false
+ File.writable?("debug_helper.rb"): true
```