Class: Trocla::Encryptions

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

Defined Under Namespace

Classes: Base, None, Ssl

Class Method Summary collapse

Class Method Details

.[](enc) ⇒ Object



20
21
22
# File 'lib/trocla/encryptions.rb', line 20

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

.allObject



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

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

.available?(encryption) ⇒ Boolean

Returns:

  • (Boolean)


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

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