Class: ComplianceEngine::Version

Inherits:
Object
  • Object
show all
Defined in:
lib/compliance_engine/version.rb

Overview

Handle supported compliance data versions

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ Version

Verify that the version is supported

Parameters:

  • version (String)

    The version to verify



11
12
13
14
15
# File 'lib/compliance_engine/version.rb', line 11

def initialize(version)
  raise 'Missing version' if version.nil?
  raise "Unsupported version '#{version}'" unless version == '2.0.0'
  @version = version
end

Instance Method Details

#to_sString

Convert the version to a string

Returns:

  • (String)


20
21
22
# File 'lib/compliance_engine/version.rb', line 20

def to_s
  @version
end