Sha256: b6e85cc84ad18543743272871f573ebaaba88eaa8a9228d981987fcc62c7c072

Contents?: true

Size: 399 Bytes

Versions: 2

Compression:

Stored size: 399 Bytes

Contents

type address = { address: String, country: Symbol? }
type email = { email: String }

class AddressSchema < StrongJSON
  def address: -> StrongJSON::Type::Object[address]
  def email: -> StrongJSON::Type::Object[email]
  def contact: -> StrongJSON::Type::Object[email | address]
  def person: -> StrongJSON::Type::Object[{ name: String, contacts: Array[email | address] }]
end

Schema: AddressSchema

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
strong_json-2.1.2 example/sig/example.rbs
strong_json-2.1.1 example/sig/example.rbs