Sha256: 6023415705ad24e0327ea44121d741ef6f7191ff969f39e7152eb9d279982d27
Contents?: true
Size: 460 Bytes
Versions: 11
Compression:
Stored size: 460 Bytes
Contents
module Swaggard module Swagger class Definition attr_reader :id def initialize(id) @id = id @properties = [] end def add_property(property) @properties << property end def to_doc { 'type' => 'object', 'required' => [], 'properties' => Hash[@properties.map { |property| [property.id, property.to_doc] }] } end end end end
Version data entries
11 entries across 11 versions & 1 rubygems