1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Thing
  @@foo = nil
  def self.check_foo
    p @@foo
  end
  class_eval <<-EOS
  def self.check_foo_eval
    p @@foo
  end
  EOS
end

Thing.check_foo
Thing.check_foo_eval