Class: Pbmenv::VersionPathname
- Inherits:
-
Object
- Object
- Pbmenv::VersionPathname
- Defined in:
- lib/pbmenv/version_pathname.rb
Instance Attribute Summary collapse
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
- #app_rb_erb_path ⇒ Object
- #app_rb_path ⇒ Object
- #device_id_path_in_shared ⇒ Object
- #device_id_path_in_version ⇒ Object
-
#initialize(version) ⇒ VersionPathname
constructor
A new instance of VersionPathname.
- #lib_app_generator ⇒ Object
- #project_template_file_paths(include_app_erb:) ⇒ Object
- #src_pbm_path ⇒ Object
- #src_pbm_project_template_app_rb_erb_path ⇒ Object
- #src_pbm_project_template_path ⇒ Object
- #src_project_template_systemd_units ⇒ Object
- #version_path ⇒ Object
- #version_path_without_v ⇒ Object
Constructor Details
#initialize(version) ⇒ VersionPathname
Returns a new instance of VersionPathname.
5 6 7 |
# File 'lib/pbmenv/version_pathname.rb', line 5 def initialize(version) self.version = version end |
Instance Attribute Details
#version ⇒ Object
Returns the value of attribute version.
3 4 5 |
# File 'lib/pbmenv/version_pathname.rb', line 3 def version @version end |
Class Method Details
.current ⇒ Object
67 68 69 |
# File 'lib/pbmenv/version_pathname.rb', line 67 def self.current File.join(Pbmenv.pbm_dir, "current") end |
.device_id_path_in_shared ⇒ Object
63 64 65 |
# File 'lib/pbmenv/version_pathname.rb', line 63 def self.device_id_path_in_shared File.join(shared, "device_id") end |
Instance Method Details
#app_rb_erb_path ⇒ Object
21 22 23 |
# File 'lib/pbmenv/version_pathname.rb', line 21 def app_rb_erb_path File.join(version_path, "app.rb.erb") end |
#app_rb_path ⇒ Object
17 18 19 |
# File 'lib/pbmenv/version_pathname.rb', line 17 def app_rb_path File.join(version_path, "app.rb") end |
#device_id_path_in_shared ⇒ Object
43 44 45 |
# File 'lib/pbmenv/version_pathname.rb', line 43 def device_id_path_in_shared File.join(self.class.shared, "device_id") end |
#device_id_path_in_version ⇒ Object
25 26 27 |
# File 'lib/pbmenv/version_pathname.rb', line 25 def device_id_path_in_version File.join(version_path, "device_id") end |
#lib_app_generator ⇒ Object
55 56 57 |
# File 'lib/pbmenv/version_pathname.rb', line 55 def lib_app_generator File.join(src_pbm_project_template_path, "lib", "app_generator") end |
#project_template_file_paths(include_app_erb:) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/pbmenv/version_pathname.rb', line 33 def project_template_file_paths(include_app_erb: ) paths = ["README.md", "setting.yml"] if include_app_erb paths << "app.rb.erb" else paths << "app.rb" end return paths.map { |path| File.join(src_pbm_project_template_path, path) } end |
#src_pbm_path ⇒ Object
29 30 31 |
# File 'lib/pbmenv/version_pathname.rb', line 29 def src_pbm_path File.join("/tmp", "procon_bypass_man-#{version}") end |
#src_pbm_project_template_app_rb_erb_path ⇒ Object
51 52 53 |
# File 'lib/pbmenv/version_pathname.rb', line 51 def src_pbm_project_template_app_rb_erb_path File.join(src_pbm_project_template_path, "app.rb.erb") end |
#src_pbm_project_template_path ⇒ Object
47 48 49 |
# File 'lib/pbmenv/version_pathname.rb', line 47 def src_pbm_project_template_path File.join(src_pbm_path, "project_template") end |
#src_project_template_systemd_units ⇒ Object
59 60 61 |
# File 'lib/pbmenv/version_pathname.rb', line 59 def src_project_template_systemd_units File.join(src_pbm_project_template_path, "systemd_units") end |