Module: Pageflow::RailsVersion Private

Extended by:
RailsVersion
Included in:
RailsVersion
Defined in:
lib/pageflow/rails_version.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Constant Summary collapse

SUPPORTED =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

['>= 7.2', '< 8.2'].freeze
DEFAULT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'~> 7.2.0'.freeze

Instance Method Summary collapse

Instance Method Details

#detectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
# File 'lib/pageflow/rails_version.rb', line 9

def detect
  from_env || DEFAULT
end

#experimental?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


17
18
19
# File 'lib/pageflow/rails_version.rb', line 17

def experimental?
  !Gem::Requirement.new(SUPPORTED).satisfied_by?(requested_version)
end

#requirementObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/pageflow/rails_version.rb', line 13

def requirement
  experimental? ? [] : SUPPORTED
end