Class: ComplianceEngine::Version
- Inherits:
-
Object
- Object
- ComplianceEngine::Version
- Defined in:
- lib/compliance_engine/version.rb
Overview
Handle supported compliance data versions
Instance Method Summary collapse
-
#initialize(version) ⇒ Version
constructor
Verify that the version is supported.
-
#to_s ⇒ String
Convert the version to a string.
Constructor Details
#initialize(version) ⇒ Version
Verify that the version is supported
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_s ⇒ String
Convert the version to a string
20 21 22 |
# File 'lib/compliance_engine/version.rb', line 20 def to_s @version end |