Module: CacheClear

Defined in:
lib/cache_clear.rb,
lib/cache_clear/engine.rb,
lib/cache_clear/version.rb,
app/controllers/cache_clear/application_controller.rb,
app/controllers/cache_clear/cache_clear_controller.rb

Defined Under Namespace

Classes: ApplicationController, CacheClearController, Engine

Constant Summary collapse

VERSION =
"0.0.1"

Class Method Summary collapse

Class Method Details

.authorized?(params) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/cache_clear.rb', line 13

def authorized?(params)
  !config.auth_token || config.auth_token == params[:auth_token]
end

.configObject



9
10
11
# File 'lib/cache_clear.rb', line 9

def config
  @config ||= Struct.new(:auth_token).new
end

.configure {|config| ... } ⇒ Object

Yields:



5
6
7
# File 'lib/cache_clear.rb', line 5

def configure
  yield config
end