Sha256: 724139af40eab312cc1b802ad228809bf00dbdda838fca114e8c0bc37777b3ab

Contents?: true

Size: 1.15 KB

Versions: 7

Compression:

Stored size: 1.15 KB

Contents

# frozen_string_literal: true

require 'bundler'
Bundler.setup
require 'dry-struct'
require 'dry-types'
require 'sober_swag/types'
require 'sober_swag/version'
require 'active_support/inflector'

##
# Root namespace for the SoberSwag Module.
module SoberSwag
  ##
  # Root Error Class for SoberSwag errors.
  class Error < StandardError; end

  autoload :Parser, 'sober_swag/parser'
  autoload :Serializer, 'sober_swag/serializer'
  autoload :OutputObject, 'sober_swag/output_object'
  autoload :Nodes, 'sober_swag/nodes'
  autoload :Compiler, 'sober_swag/compiler'
  autoload :Controller, 'sober_swag/controller'
  autoload :InputObject, 'sober_swag/input_object'
  autoload :Server, 'sober_swag/server'
  autoload :Type, 'sober_swag/type'
  autoload :Reporting, 'sober_swag/reporting'

  ##
  # Define a struct of something.
  # Useful to prevent weirdness from autoloading.
  #
  # @param parent [Class] the base class for the struct (default of {SoberSwag::Struct})
  # @yieldself [SoberSwag::InputObject]
  # @return [Class] the input object class generated
  def self.input_object(parent = nil, &block)
    Class.new(parent || SoberSwag::InputObject, &block)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sober_swag-0.25.2 lib/sober_swag.rb
sober_swag-0.25.1 lib/sober_swag.rb
sober_swag-0.25.0 lib/sober_swag.rb
sober_swag-0.24.1 lib/sober_swag.rb
sober_swag-0.24.0 lib/sober_swag.rb
sober_swag-0.23.0 lib/sober_swag.rb
sober_swag-0.22.0 lib/sober_swag.rb