method_source/lib
Yoshiyuki Hirano 2d7ea4448b Add MethodSource.clear_cache
We often need to clear cache.

For example, in web application development, when we changed source code, we would like the change applied to the app server without reboot.

In the case of a Rails application, this requires the following configuration:

```ruby
Rails.application.configure do
  config.to_prepare do
    MethodSource.instance_variable_set(:@lines_for_file, {})
  end
end
```

It seems so ugly, isn't it? So I feel we need to add `MethodSource.clear_cache` interface.

```diff
  Rails.application.configure do
    config.to_prepare do
-     MethodSource.instance_variable_set(:@lines_for_file, {})
+     MethodSource.clear_cache
    end
  end
```
2021-11-17 12:44:30 +09:00
..
method_source Release v1.0.0 2020-03-19 21:08:45 +08:00
method_source.rb Add MethodSource.clear_cache 2021-11-17 12:44:30 +09:00