class Rekey::ArrayOf
Public Class Methods
new(key, schema)
click to toggle source
# File lib/rekey/array_of.rb, line 4 def initialize key, schema @key = key @schema = schema end
Public Instance Methods
rekey(obj)
click to toggle source
# File lib/rekey/array_of.rb, line 9 def rekey obj obj[@key].map { |value| @schema.rekey(value) } end