Method: Efl::Elm::ElmTheme#initialize

Defined in:
lib/efl/elm/elm_theme.rb

#initialize(o = nil, &block) ⇒ ElmTheme

Returns a new instance of ElmTheme.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/efl/elm/elm_theme.rb', line 15

def initialize o=nil, &block
    @ptr = (
        case o
        when NilClass
            FFI::AutoPointer.new Native.elm_theme_new, ElmTheme.method(:release)
        when FFI::Pointer
            o
        else
            raise ArgumentError.new "wrong argument #{o.class.name}"
        end
    )
    instance_eval &block if block
end