Class: TokyoMetro::Factory::Get::Api::MetaClass::Fundamental::Generator::NewArray::Find

Inherits:
Common
  • Object
show all
Defined in:
lib/tokyo_metro/factory/get/api/meta_class/fundamental/generator/new_array/find.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Common

#process

Constructor Details

#initialize(ary) ⇒ Find

Returns a new instance of Find.



3
4
5
6
7
8
9
# File 'lib/tokyo_metro/factory/get/api/meta_class/fundamental/generator/new_array/find.rb', line 3

def initialize( ary )
  @ary = ary

  check_validity_of_ary
  check_length_of_ary
  set_namespace
end

Class Method Details

.process(ary) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/tokyo_metro/factory/get/api/meta_class/fundamental/generator/new_array/find.rb', line 11

def self.process( ary )
  if ary.empty?
    return ::Array.new
  else
    self.new( ary ).process
  end
end