Class: Fog::Hyperv::Errors::VersionError

Inherits:
ServiceError
  • Object
show all
Defined in:
lib/fog/hyperv.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(required_version, version, function) ⇒ VersionError

Returns a new instance of VersionError.



20
21
22
23
24
25
26
# File 'lib/fog/hyperv.rb', line 20

def initialize(required_version, version, function)
  @function = function
  @required_version = required_version
  @version = version

  super "#{function} requires at least Hyper-V v#{required_version}, you have v#{version}"
end

Instance Attribute Details

#functionObject (readonly)

Returns the value of attribute function.



18
19
20
# File 'lib/fog/hyperv.rb', line 18

def function
  @function
end

#required_versionObject (readonly)

Returns the value of attribute required_version.



18
19
20
# File 'lib/fog/hyperv.rb', line 18

def required_version
  @required_version
end

#versionObject (readonly)

Returns the value of attribute version.



18
19
20
# File 'lib/fog/hyperv.rb', line 18

def version
  @version
end