Class: Trocla::Formats
- Inherits:
-
Object
show all
- Defined in:
- lib/trocla/formats.rb
Overview
Defined Under Namespace
Classes: Base, Bcrypt, Md5crypt, Mysql, Pgsql, Plain, Sha1, Sha256crypt, Sha512crypt, Ssha, Sshkey, Wireguard, X509
Class Method Summary
collapse
Class Method Details
.[](format) ⇒ Object
32
33
34
|
# File 'lib/trocla/formats.rb', line 32
def [](format)
formats[format.downcase]
end
|
.all ⇒ Object
36
37
38
39
40
|
# File 'lib/trocla/formats.rb', line 36
def all
Dir[File.expand_path(
File.join(File.dirname(__FILE__), 'formats', '*.rb')
)].collect { |f| File.basename(f, '.rb').downcase }
end
|
.available?(format) ⇒ Boolean
42
43
44
|
# File 'lib/trocla/formats.rb', line 42
def available?(format)
all.include?(format.downcase)
end
|