vim changeLogの設定2<<__>> RubyのYAMLの変な挙動

Rubyのクラスのインスタンス変数 [ruby] [tips]

Rubyにはクラスにもインスタンス変数を作成することができる。

class Hoge
  def self.count_instance
    @num = 0 if @num.nil?   #クラスのインスタンス変数
    @num += 1
  end
  def self.get_count
    @num
  end
  def initialize(num)
    self.class.count_instance
    @num = num
    self
  end
  def get_count
    @num
  end
end

これがあるんならクラス変数(@@)とかっていらないのかな?

vim changeLogの設定2<<__>> RubyのYAMLの変な挙動