Sha256: e6d74b82c612d3a3eeee74950a9666bbad30fbc04b236067b0db012eae2be76d

Contents?: true

Size: 575 Bytes

Versions: 14

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/object/blank'
require 'colorize'
require 'pathname'

module Branch
  module Name
    module Locatable
      module_function

      def home_folder
        Dir.home
      end
      alias global_folder home_folder
      singleton_class.alias_method :global_folder, :home_folder

      def local_folder
        Dir.pwd
      end

      def project_folder(options: {})
        return home_folder if options.blank?

        home_folder
      end

      def temp_folder
        Dir.tmpdir
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
branch-name-3.10.2 lib/branch/name/locatable.rb
branch-name-3.10.1 lib/branch/name/locatable.rb
branch-name-3.10.0 lib/branch/name/locatable.rb
branch-name-3.9.0 lib/branch/name/locatable.rb
branch-name-3.8.0 lib/branch/name/locatable.rb
branch-name-3.7.0 lib/branch/name/locatable.rb
branch-name-3.6.0 lib/branch/name/locatable.rb
branch-name-3.5.1 lib/branch/name/locatable.rb
branch-name-3.5.0 lib/branch/name/locatable.rb
branch-name-3.4.0 lib/branch/name/locatable.rb
branch-name-3.3.0 lib/branch/name/locatable.rb
branch-name-3.2.2 lib/branch/name/locatable.rb
branch-name-3.2.1 lib/branch/name/locatable.rb
branch-name-3.0.0 lib/branch/name/locatable.rb