module SwaggerShield

Constants

VERSION

Public Class Methods

protect!(controller, swagger_file:, **opts) click to toggle source
# File lib/swagger_shield.rb, line 8
def protect!(controller, swagger_file:, **opts)
  shield = SwaggerShield::Shield.new(
    YAML.load_file(swagger_file)
  )
  controller.before_action SwaggerShield::BeforeAction.new(shield), **opts
end