Sha256: 8019a16d5a48f2002c6376a9ab075af3b2862654e3c7d4f83b8a6615cab66089

Contents?: true

Size: 307 Bytes

Versions: 23

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

module Statesman
  module Utils
    def self.rails_major_version
      Rails.version.split(".").map(&:to_i).first
    end

    def self.rails_5_or_higher?
      rails_major_version >= 5
    end

    def self.rails_4_or_higher?
      rails_major_version >= 4
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
statesman-12.1.0 lib/statesman/utils.rb
statesman-12.0.0 lib/statesman/utils.rb
statesman-11.0.0 lib/statesman/utils.rb
statesman-10.2.3 lib/statesman/utils.rb
statesman-10.2.2 lib/statesman/utils.rb
statesman-10.2.1 lib/statesman/utils.rb
statesman-10.2.0 lib/statesman/utils.rb
statesman-10.1.0 lib/statesman/utils.rb
statesman-10.0.0 lib/statesman/utils.rb
statesman-9.0.1 lib/statesman/utils.rb
statesman-9.0.0 lib/statesman/utils.rb
statesman-8.0.3 lib/statesman/utils.rb
statesman-8.0.2 lib/statesman/utils.rb
statesman-8.0.1 lib/statesman/utils.rb
statesman-8.0.0 lib/statesman/utils.rb
statesman-7.4.1 lib/statesman/utils.rb
statesman-7.4.0 lib/statesman/utils.rb
statesman-7.3.0 lib/statesman/utils.rb
statesman-7.2.0 lib/statesman/utils.rb
statesman-7.1.0 lib/statesman/utils.rb