Module: SaferRailsConsole::RailsVersion
- Defined in:
- lib/safer_rails_console/rails_version.rb
Constant Summary collapse
- RAILS_VERSION =
Gem::Version.new(::Rails.version)
Class Method Summary collapse
Class Method Details
.eight_or_above? ⇒ Boolean
20 21 22 23 24 |
# File 'lib/safer_rails_console/rails_version.rb', line 20 def eight_or_above? return @eight_or_above if defined?(@eight_or_above) @eight_or_above = SaferRailsConsole::RailsVersion::RAILS_VERSION >= ::Gem::Version.new('8.0.0') end |
.six_or_above? ⇒ Boolean
14 15 16 17 18 |
# File 'lib/safer_rails_console/rails_version.rb', line 14 def six_or_above? return @six_or_above if defined?(@six_or_above) @six_or_above = SaferRailsConsole::RailsVersion::RAILS_VERSION >= ::Gem::Version.new('6.0.0') end |
.supported? ⇒ Boolean
10 11 12 |
# File 'lib/safer_rails_console/rails_version.rb', line 10 def supported? six_or_above? end |