Method: Efl::EcoreEvas::REcoreEvas#initialize
- Defined in:
- lib/efl/ecore_evas.rb
#initialize(o = nil, &block) ⇒ REcoreEvas
Returns a new instance of REcoreEvas.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/efl/ecore_evas.rb', line 22 def initialize o=nil, &block @ptr = ( case o when NilClass FFI::AutoPointer.new Native.ecore_evas_new(nil, 0, 0, 0, 0, nil), REcoreEvas.method(:release) when Hash FFI::AutoPointer.new Native.ecore_evas_new(o[:engine_name], o[:x], o[:y], o[:w], o[:h], o[:extra_options]), REcoreEvas.method(:release) when FFI::Pointer o else raise ArgumentError.new "wrong argument #{o.class.name}" end ) instance_eval &block if block end |