Module: Bootscale

Defined in:
lib/bootscale.rb,
lib/bootscale/cache.rb,
lib/bootscale/entry.rb,
lib/bootscale/utils.rb,
lib/bootscale/version.rb,
lib/bootscale/file_storage.rb,
lib/bootscale/cache_builder.rb,
lib/bootscale/active_support.rb

Defined Under Namespace

Modules: ActiveSupport, Utils Classes: Cache, CacheBuilder, DevelopmentCache, Entry, FileStorage

Constant Summary collapse

DOT_SO =
'.so'.freeze
DOT_RB =
'.rb'.freeze
LEADING_SLASH =
'/'.freeze
VERSION =
'0.7.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.cacheObject (readonly)

Returns the value of attribute cache.



10
11
12
# File 'lib/bootscale.rb', line 10

def cache
  @cache
end

.cache_directoryObject (readonly)

Returns the value of attribute cache_directory.



10
11
12
# File 'lib/bootscale.rb', line 10

def cache_directory
  @cache_directory
end

.loggerObject

Returns the value of attribute logger.



11
12
13
# File 'lib/bootscale.rb', line 11

def logger
  @logger
end

Class Method Details

.cache_builderObject



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

def cache_builder
  @cache_builder ||= CacheBuilder.new
end

.regenerateObject



17
18
19
# File 'lib/bootscale.rb', line 17

def regenerate
  cache.reload
end

.setup(options = {}) ⇒ Object



21
22
23
24
25
26
# File 'lib/bootscale.rb', line 21

def setup(options = {})
  @cache_directory = options[:cache_directory]
  cache_implementation = options.fetch(:development_mode, false) ? DevelopmentCache : Cache
  @cache = cache_implementation.new(cache_directory)
  require_relative 'bootscale/core_ext'
end