Class: Icarus::Mod::Tools::Validator

Inherits:
Object
  • Object
show all
Defined in:
lib/icarus/mod/tools/validator.rb

Overview

Validate Methods

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#arrayObject (readonly)

Returns the value of attribute array.



8
9
10
# File 'lib/icarus/mod/tools/validator.rb', line 8

def array
  @array
end