Exception: Solve::Errors::InvalidVersionFormat

Inherits:
SolveError
  • Object
show all
Defined in:
lib/solve/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ InvalidVersionFormat

Returns a new instance of InvalidVersionFormat.

Parameters:

  • version (#to_s)


10
11
12
# File 'lib/solve/errors.rb', line 10

def initialize(version)
  @version = version
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



7
8
9
# File 'lib/solve/errors.rb', line 7

def version
  @version
end

Instance Method Details

#messageObject



14
15
16
# File 'lib/solve/errors.rb', line 14

def message
  "'#{version}' did not contain a valid version string: 'x.y.z' or 'x.y'."
end