Module: Listen::Compat::Wrapper
- Defined in:
- lib/listen/compat/wrapper.rb
Defined Under Namespace
Classes: Ancient, Common, Current, Old, Stale
Class Attribute Summary collapse
- .listen_module ⇒ Object
-
.wrapper_class ⇒ Object
Returns the value of attribute wrapper_class.
Class Method Summary collapse
-
.create(version_string = nil) ⇒ Object
Returns a wrapper matching the listen version.
Class Attribute Details
.listen_module ⇒ Object
40 41 42 |
# File 'lib/listen/compat/wrapper.rb', line 40 def listen_module @listen_module ||= Listen end |
.wrapper_class ⇒ Object
Returns the value of attribute wrapper_class.
38 39 40 |
# File 'lib/listen/compat/wrapper.rb', line 38 def wrapper_class @wrapper_class end |
Class Method Details
.create(version_string = nil) ⇒ Object
Returns a wrapper matching the listen version
161 162 163 164 165 166 167 168 169 |
# File 'lib/listen/compat/wrapper.rb', line 161 def self.create(version_string = nil) return Wrapper.wrapper_class.new if Wrapper.wrapper_class version = Gem::Version.new(version_string || _detect_listen_version) [Ancient, Old, Stale, Current].each do |klass| return klass.new if version < klass.const_get('NEXT_VERSION') end end |