lib/datacaster/predefined.rb in datacaster-0.9.1 vs lib/datacaster/predefined.rb in datacaster-2.0.1
- old
+ new
@@ -31,10 +31,11 @@
end
def array_schema(element_caster)
ArraySchema.new(element_caster)
end
+ alias_method :array_of, :array_schema
def hash_schema(fields)
HashSchema.new(fields)
end
@@ -81,9 +82,13 @@
end
end
keys.length == 1 ? result.first : result
}
+ end
+
+ def merge_message_keys(*keys)
+ MessageKeysMerger.new(keys)
end
def responds_to(method)
check('RespondsTo', "must respond to #{method.inspect}") { |x| x.respond_to?(method) }
end