new ¤¬½ª¤ï¤Ã¤Æ¤¤¤Ê¤¤¤«¤é¡¢¥ì¥·¡¼¥Ð¤Ë¤Ê¤ë¤Ï¤º¤Î self ¤¬Â¸ºß¤·¤Ê¤¤¤»¤¤¤Ç ½ÐÍè¤Ê¤¤¤â¤Î¤À¤È¤Ð¤«¤ê»×¤Ã¤Æ¤¤¤¿¤é
__send__("method")
¤ÇÎɤ¤¤é¤·¤¤¡£
¤Ç¤âÍýͳ¤¬Ê¬¤«¤é¤Ê¤¤¡Ä¡Ä¡£¥¿¥¤¥ß¥ó¥°¤ÎÌäÂê¤Ê¤Î¤«??
ruby ¤Ï attr_* ¤Ç´Êñ¤Ë¥¢¥¯¥»¥µ¤ò½ñ¤¯¤³¤È¤¬½ÐÍè¤ë¤±¤É¡¢ ¤³¤ì¤Ë¤â¤¦¾¯¤·µ¡Ç½¤ò¤·¤¿¤¤¾ì¹ç¤Ï¤É¤¦¤·¤¿¤éÎɤ¤¤Î¤À¤í¤¦¡£
class Foo @@bar = "bar" def initialize @bar = nil end end
Î㤨¤Ð¤³¤ó¤Ê¥¯¥é¥¹¤Ç¡¢Æ±Ì¾¤Î¥¯¥é¥¹ÊÑ¿ô¤¬¤¢¤ê¡¢ ¤«¤Ä¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤¬ nil ¤Ê¤é¤Ð¥¯¥é¥¹ÊÑ¿ô¤ÎÃͤòÊÖ¤¹Æɤ߹þ¤ßÍÑ´Ø¿ô¤È¡¢ ÉáÄ̤˥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤Ë½ñ¤¹þ¤à¤¿¤á¤Î´Ø¿ô¤¬Íߤ·¤¤¡£
°ì¤Ä¤º¤Ä½ñ¤±¤Ð
def bar; @bar == nil ? @@bar : @bar; end def bar=(v); @bar = v; end
¤³¤¦¤¤¤¦É÷(½ñ¤¹þ¤ß¤Ï attr_writer ¤½¤Î¤Þ¤Þ)¤Ê¤Î¤À¤¬¡¢ ÊÑ¿ôÁ´Éô¤Ë¤Á¤Þ¤Á¤Þ½ñ¤¤¤Æ¤é¤ì¤Ê¤¤¡£
perl ¤ÎÍͤË̤ÄêµÁÁ´Éô¤ò°ú¤¼õ¤±¤ë´Ø¿ô¤ß¤¿¤¤¤Ê¤â¤Î¤Ï½ñ¤±¤Ê¤¤¤è¤¦¤À¤·¡£ class_eval (instance_eval?) ¤ò»È¤¦¤Î¤«¤Í¡©
¤ä¤¹¤¤»Õ¤«¤é¡ÖÎã³°¤ò¤¢¤²¤Æ¡Ä¡Ä¡×¤È¤¤¤¦¥Ò¥ó¥È¤ß¤¿¤¤¤Ê¤Î¤òÁ°¤Ë¤Á¤ç¤Ã¤È ʹ¤¤¤¿¤±¤ì¤É¹Í¤¨¤Æ¤âʬ¤«¤é¤Ê¤¤¡Ä¡Ä
ŬÅö¤ËÆ°¤«¤·¤Æ¤ß¤¿¡£³Î¤«¤ËÊØÍø¤À¡£ URL ¤Ë¹¹¿·»þ´Ö¤Î(?) query strig ¤ò¤¯¤Ã¤Ä¤±¤Æ¤¯¤ì¤ë¤«¤é¡¢ ¥Ö¥é¥¦¥¶¤Îµ¡Ç½¤Çé¤Ã¤¿¤«¤É¤¦¤«¤¹¤°Ê¬¤«¤ë(¿§¤¬ÊѤï¤ë¤«¤é)¤È¤¤¤¦¤Î¤¬Îɤ¤¤Í¡£
sugi@tempest:~% convert -version Version: ImageMagick 5.5.7 06/10/03 Q16 http://www.imagemagick.org Copyright: Copyright (C) 2003 ImageMagick Studio LLC sugi@tempest:~% ll /usr/lib/libpng12.so.0 lrwxrwxrwx 1 root root 19 2003-06-16 14:55 /usr/lib/libpng12.so.0 -> libpng12.so.0.1.2.5 sugi@tempest:~% convert ~/data/photo/dcim/100casio/cimg0001.jpg tmp.png convert: buffer error (tmp.png).
²¿¸Î¤«ºß¤ëÄøÅÙ¤ÎÂ礤µ¤Ë¤Ê¤ë¤È¡¢¥Ñ¥ì¥Ã¥È¥â¡¼¥É¤Ë¤·¤Æ¤ä¤é¤Ê¤¤¤È¤Á¤ã¤ó¤È½ñ¤±¤Ê¤¤ÌÏÍÍ¡£ libpng ¤ÎÌäÂê¤Ê¤Î¤«¤Ê¡©
"-type Palette" ¤ò¤Ä¤±¤ì¤Ð½ñ¤±¤ë(¸µ²èÁü¤¬ TrueColor ¤Ê¤é¸º¿§¤µ¤ì¤ë¤±¤É)¡£ ¤Þ¤¢¤È¤ê¤¢¤¨¤º¤³¤ì¤Ç²óÈò¤¹¤ë¤«¡£
¤½¤ì¤Ï³Î¤«¤Ë¡£¼ÂºÝ¤Ë¤½¤ì¤¬¥µ¡¼¥Ð¦¤Ë¥ê¥¯¥¨¥¹¥È¤µ¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹¤·¡£
¤È¤¤¤¦¤ï¤±¤ÇÌÂÏǤˤʤé¤Ê¤¤Íͤˤ¤¤¸¤Ã¤Æ¤ß¤ë¡£ ¤·¤«¤·¡¢¸Ä¿ÍŪ¤Ë UA ¦¤Î´ûÆÉȽÄ꤬ÊØÍø¤¹¤®¤ë¤Î¤Ç¤³¤ì¤Ï³°¤·¤¿¤¯¤Ê¤¤¡£ ¤Á¤ç¤Ã¤È¤À¤±Çº¤ó¤Ç ¡Ö#dummystrÆüÉÕ¡× ¤È¤«¤Ë¤·¤Æ¤ß¤Þ¤·¤¿¡£ ¤¢¤ó¤Þ¤êÊѤï¤Ã¤Æ¤Ê¤¤¤±¤É ¡Ö?¡× ¤è¤ê¤Ï¤Þ¤·¤À¤í¤¦¤È¡Ä¡Ä
ËÜÅö¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
¤à¡£¤Ê¤ë¤Û¤É¡¢ Module ¤Ë¥á¥½¥Ã¥É¤ò¤»¤Ð¤¤¤¤¤Î¤Ç¤¹¤«¡£ ¤ª¤Þ¤±¤Ë module_eval ¤Î°ÕÌ£¤ò´ª°ã¤¤¤·¤Æ¤¤¤¿ÌÏÍÍ¡Ä¡Ä
¤È¤ê¤¢¤¨¤º¤³¤ì¤ò»È¤Ã¤Æ¾¯¤·½ñ¤Ä¾¤·¤ËÄ©Àï¡£
?????ƥʤκǸ??ˤĤ?????????פȤ????ΤϤ??Þ¤??Áµ????????Þ¤??󡥤À¤Ã¤Æ¼ÂºÝ¤Ë¤Ï¤????? URL ?Ϥʤ??櫓?À¤????????Ë¥??????????????ΤϤÁ¤??äȤ????À¤Ê¤???
?????ʴ????Ǥ??礦????<br>class Module<br> private<br> def my_attr_accessor(*symbols)<br> symbols.each {|symbol|<br> module_eval(<<-EOS)<br> def #{symbol}; @#{symbol} == nil ? @@#{symbol} : @#{symbol}; end<br> def #{symbol}=(v); @#{symbol} = v; end<br> EOS<br> }<br> end<br>end<br><br>class Foo<br> @@bar = "bar"<br> def initialize<br> @bar = nil<br> end<br> my_attr_accessor :bar<br>end
?ϤƤʥ????ƥʤߤ????Ë¡????À¥??쥯?Ȥ???CGI???Ñ°Õ¤??Æ¡????????̤??ΤϤɤ??Ǥ??礦????