diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-25 16:01:18 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-25 16:01:18 +0200 |
commit | 2274a2d1cb853731c8adf10cf266dadd7813f797 (patch) | |
tree | fd256ee89037075603807e9538b41b461bc38677 /lib/efl/ecore_getopt.rb | |
parent | 63a9b8fc30b5ef929f350d2bf23ebbda66150bce (diff) | |
download | ffi-efl-2274a2d1cb853731c8adf10cf266dadd7813f797.zip ffi-efl-2274a2d1cb853731c8adf10cf266dadd7813f797.tar.gz |
More specs for ecore_getopt
Diffstat (limited to 'lib/efl/ecore_getopt.rb')
-rw-r--r-- | lib/efl/ecore_getopt.rb | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/efl/ecore_getopt.rb b/lib/efl/ecore_getopt.rb index 38c1f8c..00de244 100644 --- a/lib/efl/ecore_getopt.rb +++ b/lib/efl/ecore_getopt.rb @@ -240,21 +240,23 @@ module Efl # end # def debug - puts "#{self.class} : #{@parser_p.to_ptr}" + r = '' + r << "#{self.class} : #{@parser_p.to_ptr}\n" [:prog,:usage,:version,:copyright,:license,:description].each do |sym| - puts " #{sym.to_s} : #{@parser_p[sym]==FFI::Pointer::NULL ? 'NULL' : @parser_p[sym].read_string}" + r<< " #{sym.to_s} : #{@parser_p[sym]==FFI::Pointer::NULL ? 'NULL' : @parser_p[sym].read_string}\n" end - puts " strict : #{@parser_p[:strict]}" + r << " strict : #{@parser_p[:strict]}\n" i=0 while true d = @parser_p.desc_ptr i break if d[:shortname]==0 and d[:longname] == FFI::Pointer::NULL - puts " desc #{d.to_ptr}" - puts " short: #{d[:shortname].chr}" unless d[:shortname]==0 - puts " long: #{d[:longname].read_string}" unless d[:longname]==FFI::Pointer::NULL - puts " help: #{d[:help].read_string}" unless d[:help]==FFI::Pointer::NULL + r << " desc #{d.to_ptr}\n" + r << " short: #{d[:shortname].chr}\n" unless d[:shortname]==0 + r << " long: #{d[:longname].read_string}\n" unless d[:longname]==FFI::Pointer::NULL + r << " help: #{d[:help].read_string}\n" unless d[:help]==FFI::Pointer::NULL i+=1 end + r end end end |