class KnapsackPro::Crypto::BranchEncryptor
Constants
- NON_ENCRYPTABLE_BRANCHES
Attributes
Public Class Methods
Source
# File lib/knapsack_pro/crypto/branch_encryptor.rb, line 24 def self.call(branch) if KnapsackPro::Config::Env.branch_encrypted? new(branch).call else branch end end
Source
# File lib/knapsack_pro/crypto/branch_encryptor.rb, line 32 def initialize(branch) @branch = branch end
Public Instance Methods
Source
# File lib/knapsack_pro/crypto/branch_encryptor.rb, line 36 def call if NON_ENCRYPTABLE_BRANCHES.include?(branch) branch else Digestor.salt_hexdigest(branch)[0..6] end end