Class: Suspenders::PreloaderGenerator::SpringBinstubs

Inherits:
Object
  • Object
show all
Defined in:
lib/suspenders/generators/preloader_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(base) ⇒ SpringBinstubs

Returns a new instance of SpringBinstubs.


29
30
31
# File 'lib/suspenders/generators/preloader_generator.rb', line 29

def initialize(base)
  @base = base
end

Instance Method Details

#invoke!Object


33
34
35
36
37
# File 'lib/suspenders/generators/preloader_generator.rb', line 33

def invoke!
  Bundler.with_unbundled_env do
    @base.send(:always_run, "spring binstub --all")
  end
end

#revoke!Object


39
40
41
42
43
# File 'lib/suspenders/generators/preloader_generator.rb', line 39

def revoke!
  Bundler.with_unbundled_env do
    @base.send(:always_run, "spring binstub --remove --all")
  end
end