lib/zilla/versions/v20/parameter.rb in zilla-0.1.1 vs lib/zilla/versions/v20/parameter.rb in zilla-0.1.2

- old
+ new

@@ -14,9 +14,12 @@ define_method(name) do json[name.to_s] end end + def in?(location) = json["in"] == location + def required? = !!@json["required"] + def validate!(value) errors = schema.validate(value) raise ArgumentError, errors.to_a.to_s if errors.any? end