Class: DataDepo::ArrayData

Inherits:
Array
  • Object
show all
Defined in:
lib/data_depo/array_data.rb

Class Method Summary collapse

Class Method Details

.gen(name, array) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/data_depo/array_data.rb', line 6

def gen(name, array)
  a = self[*array]
  nm = name.to_s.split('/').first
  a.instance_variable_set(:@name, nm)
  mod = action_module(nm)
  (class << a; self; end).__send__(:include, mod) if mod
  a
end