This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def object_report(type = nil) | |
| if type | |
| puts "number of (#{type}) objects in memory = #{ObjectSpace.each_object(type).count}" | |
| else | |
| puts "number of objects in memory = #{ObjectSpace.each_object.count}" | |
| end | |
| end | |
| def full_report | |
| ObjectSpace.each_object.to_a.inject(Hash.new(0)) do |h,o| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file "/path/to/pipe" do | |
| owner "bob" | |
| group "employees" | |
| mode 0755 | |
| only_if { FileTest.pipe?("/path/to/pipe") } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| processor : 0 | |
| vendor_id : GenuineIntel | |
| cpu family : 6 | |
| model : 42 | |
| model name : Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz | |
| stepping : 7 | |
| cpu MHz : 1600.000 | |
| cache size : 8192 KB | |
| physical id : 0 | |
| siblings : 8 |