summaryrefslogtreecommitdiffstats
path: root/lib/efl/ecore_evas.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-02-27 11:37:06 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-02-27 11:37:06 +0100
commit7603f4c0902bf5845c7e7654c3745f5519347c8b (patch)
treebd381bf3a7f04d2ee7ddd92111c35a03472c7ecf /lib/efl/ecore_evas.rb
parent8c013976d73850718e75bbc93a03f3f016fc3ae8 (diff)
downloadffi-efl-7603f4c0902bf5845c7e7654c3745f5519347c8b.zip
ffi-efl-7603f4c0902bf5845c7e7654c3745f5519347c8b.tar.gz
use instance_eval instead of yield self.
- simplify and highlights initialization code - but shadows external scope variables
Diffstat (limited to 'lib/efl/ecore_evas.rb')
-rw-r--r--lib/efl/ecore_evas.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/efl/ecore_evas.rb b/lib/efl/ecore_evas.rb
index d5e01b0..a2043a1 100644
--- a/lib/efl/ecore_evas.rb
+++ b/lib/efl/ecore_evas.rb
@@ -19,7 +19,7 @@ module Efl
class REcoreEvas
include Efl::ClassHelper
search_prefixes 'ecore_evas_'
- def initialize o=nil
+ def initialize o=nil, &block
@ptr = (
case o
when NilClass
@@ -32,7 +32,7 @@ module Efl
raise ArgumentError.new "wrong argument #{o.class.name}"
end
)
- yield self if block_given?
+ instance_eval &block if block
end
def self.release p
Native.ecore_evas_free p