Method: Efl::EcoreGetopt::REcoreGetopt#append_meta

Defined in:
lib/efl/ecore_getopt.rb

#append_meta(short, long, help, meta, sub_type, def_val = nil) ⇒ Object


288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/efl/ecore_getopt.rb', line 288

def append_meta short, long, help, meta, sub_type, def_val=nil
    if def_val.nil?
        p = FFI::Pointer::NULL
    else
        p = def_val.inject(FFI::Pointer::NULL) { |list,e|
            ptr = FFI::MemoryPointer.new sub_type
            @pts << ptr
            ptr.send 'write_'+sub_type.to_s, e
            Native.eina_list_append list, ptr
        }
    end
    set_value short, :list, [want_p(p),sub_type]
    set_option [ short, long, help, meta, :ecore_getopt_action_append, [:append,@types[sub_type][0]] ]
end