Module: Branch::Name::Locatable
- Included in:
- CLI, Configurable, Projectable
- Defined in:
- lib/branch/name/locatable.rb
Class Method Summary collapse
-
.global_folder? ⇒ Boolean
Is the current folder we’re in the same as the global folder?.
- .home_folder ⇒ Object (also: global_folder)
- .local_folder ⇒ Object
- .project_folder(options: {}) ⇒ Object
- .temp_folder ⇒ Object
Class Method Details
.global_folder? ⇒ Boolean
Is the current folder we’re in the same as the global folder?
23 24 25 |
# File 'lib/branch/name/locatable.rb', line 23 def global_folder? global_folder == local_folder end |
.home_folder ⇒ Object Also known as: global_folder
12 13 14 |
# File 'lib/branch/name/locatable.rb', line 12 def home_folder Dir.home end |
.local_folder ⇒ Object
18 19 20 |
# File 'lib/branch/name/locatable.rb', line 18 def local_folder Dir.pwd end |
.project_folder(options: {}) ⇒ Object
27 28 29 30 31 |
# File 'lib/branch/name/locatable.rb', line 27 def project_folder(options: {}) return home_folder if .blank? home_folder end |
.temp_folder ⇒ Object
33 34 35 |
# File 'lib/branch/name/locatable.rb', line 33 def temp_folder Dir.tmpdir end |