Class: Appraisal::Matrix::AppraiseFileWithMatrix::VersionArray
- Inherits:
-
Object
- Object
- Appraisal::Matrix::AppraiseFileWithMatrix::VersionArray
- Defined in:
- lib/appraisal/matrix/extensions/appraisal_file.rb
Constant Summary collapse
- SUPPORTED_VERSION_STEPS =
[:major, :minor, :patch].freeze
Instance Attribute Summary collapse
-
#gem_name ⇒ Object
readonly
Returns the value of attribute gem_name.
-
#step ⇒ Object
readonly
Returns the value of attribute step.
-
#version_requirements ⇒ Object
readonly
Returns the value of attribute version_requirements.
Instance Method Summary collapse
-
#initialize(gem_name:, versions:, step: :minor) ⇒ VersionArray
constructor
A new instance of VersionArray.
- #versions ⇒ Object
Constructor Details
#initialize(gem_name:, versions:, step: :minor) ⇒ VersionArray
Returns a new instance of VersionArray.
14 15 16 17 18 19 20 |
# File 'lib/appraisal/matrix/extensions/appraisal_file.rb', line 14 def initialize(gem_name:, versions:, step: :minor) SUPPORTED_VERSION_STEPS.include?(step) or raise("Unsupported version step: #{step}") @gem_name = gem_name @version_requirements = Gem::Requirement.new(versions) @step = step.to_sym end |
Instance Attribute Details
#gem_name ⇒ Object (readonly)
Returns the value of attribute gem_name.
12 13 14 |
# File 'lib/appraisal/matrix/extensions/appraisal_file.rb', line 12 def gem_name @gem_name end |
#step ⇒ Object (readonly)
Returns the value of attribute step.
12 13 14 |
# File 'lib/appraisal/matrix/extensions/appraisal_file.rb', line 12 def step @step end |
#version_requirements ⇒ Object (readonly)
Returns the value of attribute version_requirements.
12 13 14 |
# File 'lib/appraisal/matrix/extensions/appraisal_file.rb', line 12 def version_requirements @version_requirements end |
Instance Method Details
#versions ⇒ Object
22 23 24 |
# File 'lib/appraisal/matrix/extensions/appraisal_file.rb', line 22 def versions RubygemsHelper.versions_to_test(gem_name, version_requirements, step) end |