Class: Icarus::Mod::Tools::Validator
- Inherits:
-
Object
- Object
- Icarus::Mod::Tools::Validator
- Defined in:
- lib/icarus/mod/tools/validator.rb
Overview
Validate Methods
Instance Attribute Summary collapse
-
#array ⇒ Object
readonly
Returns the value of attribute array.
Instance Method Summary collapse
-
#initialize(type) ⇒ Validator
constructor
A new instance of Validator.
Constructor Details
#initialize(type) ⇒ Validator
Returns a new instance of Validator.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/icarus/mod/tools/validator.rb', line 10 def initialize(type) @array = case type when :modinfo Sync::Mods.new.info_array when :toolinfo Sync::Tools.new.info_array else raise ArgumentError, "Invalid type: #{type}" end end |
Instance Attribute Details
#array ⇒ Object (readonly)
Returns the value of attribute array.
8 9 10 |
# File 'lib/icarus/mod/tools/validator.rb', line 8 def array @array end |