module What
  
  @foo = 'bar'

  class Whatever
    def change_foo
      What.instance_variable_set(:@foo, "changed")
    end
  end
  
end


w = What::Whatever.new

p What.instance_variable_get(:@foo)

w.change_foo

p What.instance_variable_get(:@foo)

# >> "bar"
# >> "changed"

