Sha256: 537805a921a72b89aa42b3fa907f57a2f4bc05620d8769e3a6f7f7adb436dcf6
Contents?: true
Size: 769 Bytes
Versions: 1
Compression:
Stored size: 769 Bytes
Contents
require 'api-tester/definition/fields/field' module ApiTester class ObjectField < Field attr_accessor :fields def initialize name: super name: name self.fields = [] end def with_field newField self.fields << newField self end def has_subfields? true end def default_value obj = Hash.new self.fields.each do |field| obj[field.name] = field.default_value end obj end def negative_boundary_values super + [ "string", [], 123, 1, 0, true, false ] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
api-tester-1.0.0 | lib/api-tester/definition/fields/object_field.rb |