Sha256: ef9fcda18e5e3900325e693af85311fd67ada9afad21bdf40c4878084b41ba1f

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

require 'r2-oas/version'
require 'r2-oas/configuration'
require 'r2-oas/errors'
require 'r2-oas/schema/v3/object/public'

module R2OAS
  if !defined?(::Rails)
    raise NoImplementError, 'Can not load Rails'
  # support Rails version
  elsif ::Rails::VERSION::STRING >= '4.2.5.1'
    extend Configuration
    require 'r2-oas/task'
    require 'r2-oas/lib/core_ext/hash/deep_merge'
    require 'r2-oas/lib/core_ext/object/blank'

    autoload :Base, 'r2-oas/base'
    autoload :NoImplementError, 'r2-oas/errors'
    autoload :NoFileExistsError, 'r2-oas/errors'
    autoload :NoSupportError, 'r2-oas/errors'
    autoload :Sortable, 'r2-oas/shared/all'

    module Schema
      autoload :Base, 'r2-oas/schema/base'
      autoload :Generator, 'r2-oas/schema/generator'
      autoload :Builder, 'r2-oas/schema/builder'
      autoload :Analyzer, 'r2-oas/schema/analyzer'
      autoload :Squeezer, 'r2-oas/schema/squeezer'
      autoload :Cleaner, 'r2-oas/schema/cleaner'
    end
  else
    raise NoImplementError, "Do not support Rails Version: #{::Rails::VERSION::STRING}"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
r2-oas-0.3.4 lib/r2-oas.rb
r2-oas-0.3.3 lib/r2-oas.rb
r2-oas-0.3.2 lib/r2-oas.rb
r2-oas-0.3.1 lib/r2-oas.rb