Module: RailsDevelopmentBoost::Async::Reactor
Overview
Not using Listen gem directly, because I don’t want to be storing/checking .rb files’ SHA contents and would like to rely on mtime values exclusively.
Defined Under Namespace
Classes: Base, Darwin, Linux, MissingNativeGem, Windows
Instance Attribute Summary collapse
-
#gem_load_error ⇒ Object
readonly
Returns the value of attribute gem_load_error.
Instance Method Summary collapse
Instance Attribute Details
#gem_load_error ⇒ Object (readonly)
Returns the value of attribute gem_load_error.
22 23 24 |
# File 'lib/rails_development_boost/async/reactor.rb', line 22 def gem_load_error @gem_load_error end |
Instance Method Details
#find_usable_implementation ⇒ Object
34 35 36 37 38 39 |
# File 'lib/rails_development_boost/async/reactor.rb', line 34 def find_usable_implementation [Darwin, Linux, Windows].find(&:usable?) rescue MissingNativeGem => e @gem_load_error ||= e. nil end |
#get ⇒ Object
24 25 26 27 28 |
# File 'lib/rails_development_boost/async/reactor.rb', line 24 def get if impl = implementation impl.new end end |
#implementation ⇒ Object
30 31 32 |
# File 'lib/rails_development_boost/async/reactor.rb', line 30 def implementation defined?(@implementation) ? @implementation : (@implementation = find_usable_implementation) end |