<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>src/sample53-4.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@ Shoes Tutorial Note
 ===================
 **- For the Shoes App Rookie Creators -**
 
-October 18th, 2009 by ashbb (Satoshi Asakawa), citizen428 (Michael Kohl), kotp (Victor H. Goff III)
+October 20th, 2009 by ashbb (Satoshi Asakawa), citizen428 (Michael Kohl), kotp (Victor H. Goff III)
 
 **Note: Now under revising with Policeman!**
 
@@ -54,7 +54,7 @@ Table of contents
 	- [00529 UTF-8 (sample45.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00529_UTF-8.mdown)
 	- [00530 Open a new app window (sample46.rb, sample48.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00530_Open_a_new_app_window.mdown)
 	- [00531 Open the Shoes console window from your app (sample51.rb, sample55.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00531_Open_the_Shoes_console_window_from_your_app.mdown)
-	- [00532 Customize Shoes Class (sample53.rb, sample53-1.rb, sample53-2.rb, sample53-2.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00532_Customize_Shoes_Class.mdown)
+	- [00532 Customize Shoes Class (sample53.rb, sample53-1.rb, sample53-2.rb, sample53-3.rb, sample53-4.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00532_Customize_Shoes_Class.mdown)
 	- [00533 Image Effects with blur method (sample54.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00533_Image_Effects_with_blur_method.mdown)
 	- [00534 Video playback (sample59.rb, sample59-1.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00534_Video_playback.mdown)
 	- [00535 Scope: local variable and instance variable (sample60.rb)](http://github.com/ashbb/shoes_tutorial_html/tree/master/mdowns/00535_Scope__local_variable_and_instance_variable.mdown)</diff>
      <filename>README.md</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 Change log:
 -----------
+Oct 20th, 2009: Use class_eval to Customize Shoes Class (00532, gallery 9, 10)   
 Oct 18th, 2009: Finished confiming all 132 sample codes with Policeman (0.r1263)   
 Oct 17th, 2009: Confirmed 00508-00520 with Policeman (0.r1263)   
 Oct 15th, 2009: Confirmed 00507 with Policeman (0.r1263)   </diff>
      <filename>changelog.mdown</filename>
    </modified>
    <modified>
      <diff>@@ -79,7 +79,7 @@ Umm... I'm not sure Policeman changed the spec or .... bug.
 
 Not customize Shoes class, though...
 
-	# sample53-2.rb
+	# sample53-3.rb
 	module ExImage
 	  def small
 	    self.style :width =&gt; self.width / 2, :height =&gt; self.height / 2
@@ -109,7 +109,31 @@ Not customize Shoes class, though...
 This code works well both with Policeman and Raisins.
 
 
+**Solution**
 
+It seems good to use `class_eval` instead of `class` like this:
 
-
-
+	# sample53-4.rb
+	Shoes::Image.class_eval do
+	  def small
+	    self.style :width =&gt; self.width / 2, :height =&gt; self.height / 2
+	  end
+	  
+	  def big
+	    self.style :width =&gt; self.width * 2, :height =&gt; self.height * 2
+	  end
+	end
+	
+	PATH = '../images/yar.png'
+	
+	Shoes.app :width =&gt; 250, :height =&gt; 150 do
+	  w, h = imagesize(PATH)
+	  img = image PATH, :width =&gt; w, :height =&gt; h, :name =&gt; PATH.split('/').last
+	  msg = para 'ready', :left =&gt; w, :top =&gt; h
+	  every 3 do
+	    img.style[:width] &gt; w ? img.small : img.big
+	    msg.text = &quot;#{img.style[:name]} width is : #{img.style[:width]}&quot; + &quot;\n&quot; +
+	               &quot;#{img.style[:name]} height is : #{img.style[:height]}&quot;
+	  end
+	end
+	  </diff>
      <filename>mdowns/00532_Customize_Shoes_Class.mdown</filename>
    </modified>
    <modified>
      <diff>@@ -233,7 +233,7 @@ Look at the [online demo](http://www.rin-shun.com/rubylearning/shoes/scatter_pac
 	# gallery9.rb
 	# ScatterPack: Scatters like a school of fish
 	
-	class Shoes::Shape
+	Shoes::Shape.class_eval do
 	  [:v, :flag].each do |m|
 	    define_method(m){style[m]}
 	    define_method(m.to_s + '='){|v| style m =&gt; v}
@@ -388,7 +388,7 @@ Helper methods for writing the simple code:
 
 
 	# gallery10-image.rb
-	class Shoes::Image
+	Shoes::Image.class_eval do
 	  [:vel, :pos].each do |m|
 	    define_method(m){style[m]}
 	    define_method(&quot;#{m}=&quot;){|arg| style m =&gt; arg}
@@ -397,6 +397,7 @@ Helper methods for writing the simple code:
 	  [:x, :y].each_with_index{|m, i| define_method(m){pos[i].to_i}}
 	end
 
+
 **gallery10.png**
 
 ![gallery10.png](http://github.com/ashbb/shoes_tutorial_html/raw/master/images/gallery10.png)
@@ -405,4 +406,6 @@ Helper methods for writing the simple code:
 Policeman
 ---------
 
-Gallery 6, 7 and 8 worked well with Shoes-0.r1263. But Gallery 9 and 10 didn't... so far.
+Gallery 6, 7 and 8 worked well with Shoes-0.r1263. 
+
+Gallery 9 and 10 worked well after replaced `class` to `class_eval`.</diff>
      <filename>mdowns/01120_Fancy_Gallery_6-10.mdown</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 # gallery10-image.rb
-class Shoes::Image
+Shoes::Image.class_eval do
   [:vel, :pos].each do |m|
     define_method(m){style[m]}
     define_method(&quot;#{m}=&quot;){|arg| style m =&gt; arg}</diff>
      <filename>src/gallery10-image.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 # gallery9.rb
 # ScatterPack: Scatters like a school of fish
 
-class Shoes::Shape
+Shoes::Shape.class_eval do
   [:v, :flag].each do |m|
     define_method(m){style[m]}
     define_method(m.to_s + '='){|v| style m =&gt; v}</diff>
      <filename>src/gallery9.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-# sample53-2.rb
+# sample53-3.rb
 module ExImage
   def small
     self.style :width =&gt; self.width / 2, :height =&gt; self.height / 2</diff>
      <filename>src/sample53-3.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ Shoes Tutorial Note
 ===================
 **- For the Shoes App Rookie Creators -**
 
-October 18th, 2009 by ashbb (Satoshi Asakawa), citizen428 (Michael Kohl), kotp (Victor H. Goff III)
+October 20th, 2009 by ashbb (Satoshi Asakawa), citizen428 (Michael Kohl), kotp (Victor H. Goff III)
 
 **Note: Now under revising with Policeman!**
 </diff>
      <filename>tools/table_of_contents.txt</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>08c7455facd2e3ebc0796d28a9a770ff3464bc59</id>
    </parent>
  </parents>
  <author>
    <name>ashbb</name>
    <email>ashbbb@gmail.com</email>
  </author>
  <url>http://github.com/ashbb/shoes_tutorial_html/commit/3b43183cb1258803d4e831372a7a7d81a17b7d3d</url>
  <id>3b43183cb1258803d4e831372a7a7d81a17b7d3d</id>
  <committed-date>2009-10-20T06:09:08-07:00</committed-date>
  <authored-date>2009-10-20T06:09:08-07:00</authored-date>
  <message>Use class_eval to Customize Shoes Class (00532, gallery 9, 10)</message>
  <tree>cdc3df5a00335cc1569bdcc684fbddc1ec2ce224</tree>
  <committer>
    <name>ashbb</name>
    <email>ashbbb@gmail.com</email>
  </committer>
</commit>
