Class: Yoda::Store::VersionStore
- Inherits:
-
Object
- Object
- Yoda::Store::VersionStore
- Defined in:
- lib/yoda/store/version_store.rb
Overview
Return paths for each Ruby version.
Constant Summary collapse
- SOURCE_PATH_BASE =
File.("~/.yoda/sources")
- REGISTRY_PATH_BASE =
File.('~/.yoda/registry')
Instance Attribute Summary collapse
-
#ruby_version ⇒ Object
readonly
Returns the value of attribute ruby_version.
Class Method Summary collapse
Instance Method Summary collapse
-
#core_yardoc_path ⇒ String
Return the path to store yard document index of the core library.
-
#initialize(ruby_version) ⇒ VersionStore
constructor
A new instance of VersionStore.
-
#library_registry_path ⇒ String
Return the path to store registry of whole library.
-
#registries_path ⇒ String
Return the path to store registries.
-
#registry_path_for_core ⇒ String
Return the path to store registry of the core library.
-
#registry_path_for_gem(name:, version:) ⇒ String
Return the path to store registry of the gem.
-
#registry_path_for_stdlib ⇒ String
Return the path to store registry of the standard library.
-
#ruby_source_path ⇒ String
Return the path to store the version’s Ruby.
-
#stdlib_yardoc_path ⇒ String
Return the path to store yard document index of the standard library.
Constructor Details
#initialize(ruby_version) ⇒ VersionStore
Returns a new instance of VersionStore.
16 17 18 |
# File 'lib/yoda/store/version_store.rb', line 16 def initialize(ruby_version) @ruby_version = ruby_version end |
Instance Attribute Details
#ruby_version ⇒ Object (readonly)
Returns the value of attribute ruby_version.
13 14 15 |
# File 'lib/yoda/store/version_store.rb', line 13 def ruby_version @ruby_version end |
Class Method Details
.for_current_version ⇒ VersionStore
9 10 11 |
# File 'lib/yoda/store/version_store.rb', line 9 def self.for_current_version new(RUBY_VERSION) end |
Instance Method Details
#core_yardoc_path ⇒ String
Return the path to store yard document index of the core library.
28 29 30 |
# File 'lib/yoda/store/version_store.rb', line 28 def core_yardoc_path File.join(ruby_source_path, '.yardoc') end |
#library_registry_path ⇒ String
Return the path to store registry of whole library
66 67 68 |
# File 'lib/yoda/store/version_store.rb', line 66 def library_registry_path File.join(registries_path, Registry.registry_name, "library") end |
#registries_path ⇒ String
Return the path to store registries.
40 41 42 |
# File 'lib/yoda/store/version_store.rb', line 40 def registries_path File.join(REGISTRY_PATH_BASE, ruby_version) end |
#registry_path_for_core ⇒ String
Return the path to store registry of the core library.
54 55 56 |
# File 'lib/yoda/store/version_store.rb', line 54 def registry_path_for_core library_registry_path end |
#registry_path_for_gem(name:, version:) ⇒ String
Return the path to store registry of the gem.
48 49 50 |
# File 'lib/yoda/store/version_store.rb', line 48 def registry_path_for_gem(name:, version:) library_registry_path end |
#registry_path_for_stdlib ⇒ String
Return the path to store registry of the standard library.
60 61 62 |
# File 'lib/yoda/store/version_store.rb', line 60 def registry_path_for_stdlib library_registry_path end |
#ruby_source_path ⇒ String
Return the path to store the version’s Ruby.
22 23 24 |
# File 'lib/yoda/store/version_store.rb', line 22 def ruby_source_path File.join(SOURCE_PATH_BASE, "ruby-#{ruby_version}") end |
#stdlib_yardoc_path ⇒ String
Return the path to store yard document index of the standard library.
34 35 36 |
# File 'lib/yoda/store/version_store.rb', line 34 def stdlib_yardoc_path File.join(ruby_source_path, '.yardoc-stdlib') end |