Class: Apollo::Cache::Factory
- Inherits:
-
Object
- Object
- Apollo::Cache::Factory
- Includes:
- Singleton
- Defined in:
- lib/apollo_crawler/cache/factory.rb
Class Method Summary collapse
Instance Method Summary collapse
- #construct ⇒ Object
-
#initialize ⇒ Factory
constructor
A new instance of Factory.
Constructor Details
#initialize ⇒ Factory
Returns a new instance of Factory.
35 36 37 |
# File 'lib/apollo_crawler/cache/factory.rb', line 35 def initialize @cache = nil end |
Class Method Details
.construct ⇒ Object
39 40 41 |
# File 'lib/apollo_crawler/cache/factory.rb', line 39 def self.construct() self.singleton.construct() end |
Instance Method Details
#construct ⇒ Object
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/apollo_crawler/cache/factory.rb', line 43 def construct() if(@cache.nil? == false) return @cache end res = RbConfig::CACHE_CLASS.new(RbConfig::CACHE_CLASS_OPTIONS) @cache = res return res end |