2007-01-22から1日間の記事一覧
class Object; attr_accessor :tag; end hash = Hash::new hash.tag = Array::new p hash.tag arr = Array::new arr.tag = 1 p arr.tag でもこの方がスマートかな #使うときにinclude module Object::Tag attr_accessor :tag end include Object::Tag #また…
小数点ほにゃららで四捨五入したい class Numeric def roundoff(d=0) x = 10**d if self