Sha256: 41a4546fc1f0994742f7f6b5b6efbbea541bfc3d094573e3d17c9d20e6cceee1

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 Bytes

Contents

module Swagger
  class DefinitionSection < Hashie::Dash
    include Hashie::Extensions::Coercion
    include Hashie::Extensions::IndifferentAccess
    include Swagger::Attachable

    attr_accessor :parent

    def initialize(hash)
      super
      attach_to_children
    end

    # @api private
    # @!macro [new] section
    #   @!attribute [rw] $1
    #     $3
    #     @return [$2]
    def self.section(name, type)
      property name
      coerce_key name, type
    end

    # @api private
    # @!macro [new] section
    #   @!attribute [rw] $1
    #     **Required**. $3
    #     @return [$2]
    def self.required_section(name, type)
      property name, required: true
      coerce_key name, type
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
swagger-core-0.2.0 lib/swagger/definition_section.rb