Module: ApiGuard

Defined in:
lib/api_guard.rb,
lib/api_guard/engine.rb,
lib/api_guard/modules.rb,
lib/api_guard/version.rb,
lib/api_guard/app_secret_key.rb,
lib/api_guard/models/concerns.rb,
lib/api_guard/resource_mapper.rb,
lib/api_guard/test/controller_helper.rb,
lib/api_guard/jwt_auth/authentication.rb,
lib/api_guard/jwt_auth/json_web_token.rb,
lib/api_guard/jwt_auth/blacklist_token.rb,
lib/api_guard/jwt_auth/refresh_jwt_token.rb,
lib/api_guard/response_formatters/renderer.rb,
app/controllers/api_guard/tokens_controller.rb,
app/controllers/api_guard/passwords_controller.rb,
app/controllers/api_guard/application_controller.rb,
app/controllers/api_guard/registration_controller.rb,
app/controllers/api_guard/authentication_controller.rb,
lib/generators/api_guard/controllers/controllers_generator.rb,
lib/generators/api_guard/initializer/initializer_generator.rb

Defined Under Namespace

Modules: JwtAuth, Models, Modules, Resource, ResponseFormatters, Test Classes: AppSecretKey, ApplicationController, AuthenticationController, ControllersGenerator, Engine, InitializerGenerator, PasswordsController, RegistrationController, ResourceMapper, TokensController

Constant Summary collapse

VERSION =
'0.3.0'

Class Method Summary collapse

Class Method Details

.map_resource(routes_for, class_name) ⇒ Object


37
38
39
# File 'lib/api_guard.rb', line 37

def self.map_resource(routes_for, class_name)
  mapped_resource[routes_for.to_sym] = ApiGuard::ResourceMapper.new(routes_for, class_name)
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (ApiGuard)

    the object that the method was called on


33
34
35
# File 'lib/api_guard.rb', line 33

def self.setup
  yield self
end