Class: Package::Audit::Technology::Validator
- Inherits:
-
Object
- Object
- Package::Audit::Technology::Validator
- Defined in:
- lib/package/audit/technology/validator.rb
Instance Method Summary collapse
-
#initialize(dir) ⇒ Validator
constructor
A new instance of Validator.
- #validate!(technology) ⇒ Object
Constructor Details
#initialize(dir) ⇒ Validator
Returns a new instance of Validator.
8 9 10 |
# File 'lib/package/audit/technology/validator.rb', line 8 def initialize(dir) @dir = dir end |
Instance Method Details
#validate!(technology) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/package/audit/technology/validator.rb', line 12 def validate!(technology) case technology when Enum::Technology::NODE validate_node! when Enum::Technology::RUBY validate_ruby! else raise ArgumentError, "\"#{technology}\" is not a supported technology, " \ "use one of #{Enum::Technology.all}" end end |