Class: Trocla::Encryptions

Inherits:
Object
  • Object
show all
Defined in:
lib/trocla/encryptions.rb

Overview

Trocla::Encryptions

Defined Under Namespace

Classes: Base, None, Ssl

Class Method Summary collapse

Class Method Details

.[](enc) ⇒ Object



26
27
28
# File 'lib/trocla/encryptions.rb', line 26

def [](enc)
  encryptions[enc.to_s.downcase]
end

.allObject



30
31
32
33
34
# File 'lib/trocla/encryptions.rb', line 30

def all
  Dir[path '*'].collect do |enc|
    File.basename(enc, '.rb').downcase
  end
end

.available?(encryption) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/trocla/encryptions.rb', line 36

def available?(encryption)
  all.include?(encryption.to_s.downcase)
end