Exception: Semverse::InvalidConstraintFormat

Inherits:
SemverseError
  • Object
show all
Defined in:
lib/semverse/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(constraint) ⇒ InvalidConstraintFormat

Returns a new instance of InvalidConstraintFormat.

Parameters:

  • constraint (#to_s)

21
22
23
# File 'lib/semverse/errors.rb', line 21

def initialize(constraint)
  @constraint = constraint
end

Instance Attribute Details

#constraintObject (readonly)

Returns the value of attribute constraint


18
19
20
# File 'lib/semverse/errors.rb', line 18

def constraint
  @constraint
end

Instance Method Details

#to_sObject


25
26
27
# File 'lib/semverse/errors.rb', line 25

def to_s
  "'#{constraint}' did not contain a valid operator or a valid version string."
end