Sha256: d59768b0697c32d96cba9ddd72d730fcae07024d7ab6c8443070532385911338
Contents?: true
Size: 572 Bytes
Versions: 2
Compression:
Stored size: 572 Bytes
Contents
# frozen_string_literal: true module Branch module Name module Nameable def normalize_branch_name(branch_name) branch_name.strip! branch_name = branch_name.split.join options[:separator] branch_name.downcase! if options[:downcase] branch_name.tr!('_', '-') if options[:separator] == '-' branch_name.tr!('-', '_') if options[:separator] == '_' branch_name.squeeze!('-') if options[:separator] == '-' branch_name.squeeze!('_') if options[:separator] == '_' branch_name end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
branch-name-1.0.1.pre.beta | lib/branch/name/nameable.rb |
branch-name-1.0.0.pre.beta | lib/branch/name/nameable.rb |