Class: FeedTools::Cache::YAML::StorePath

Inherits:
Object
  • Object
show all
Defined in:
lib/feedtools/cache/yaml.rb

Overview

helper class

Direct Known Subclasses

IDStorePath, URLStorePath

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, key, base_store_path = nil) ⇒ StorePath

:nodoc:



16
17
18
19
# File 'lib/feedtools/cache/yaml.rb', line 16

def initialize(type, key, base_store_path = nil)
  base_store_path ||= defalut_base_store_path
  @path = File.join(base_store_path, type, hash_path(key))
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



20
21
22
# File 'lib/feedtools/cache/yaml.rb', line 20

def path
  @path
end

Instance Method Details

#to_sObject



22
23
24
# File 'lib/feedtools/cache/yaml.rb', line 22

def to_s
  @path.to_s
end