Sha256: d3480e346cb5315b2af72a0c6b6825ef90f9b0d85c626001af51358084b9c510

Contents?: true

Size: 576 Bytes

Versions: 1

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

module RedisWebManager
  class ApplicationController < ActionController::Base
    protect_from_forgery with: :exception

    before_action :authenticated?, if: :authenticate

    private

    def authenticated?
      instance_exec(&authenticate)
    end

    def authenticate
      RedisWebManager.authenticate
    end

    def info
      @info ||= RedisWebManager::Info.new
    end

    def connection
      @connection ||= RedisWebManager::Connection.new
    end

    def action
      @action ||= RedisWebManager::Action.new
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redis_web_manager-0.1.6 app/controllers/redis_web_manager/application_controller.rb