Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/exp.rb
Instance Method Summary collapse
Instance Method Details
#exp ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/exp.rb', line 5 def exp begin print "quick export to: " fname = gets.strip puts "" f = open(fname, "w") f.write(JSON.generate(self)) f.close "Success; #{fname} closed." rescue raise "error of some kind" end end |