Class: Trocla::Formats
- Inherits:
-
Object
show all
- Defined in:
- lib/trocla/formats.rb
Defined Under Namespace
Classes: Base, Bcrypt, Md5crypt, Mysql, Pgsql, Plain, Sha1, Sha256crypt, Sha512crypt, Ssha, X509
Class Method Summary
collapse
Class Method Details
.[](format) ⇒ Object
25
26
27
|
# File 'lib/trocla/formats.rb', line 25
def [](format)
formats[format.downcase]
end
|
.all ⇒ Object
29
30
31
|
# File 'lib/trocla/formats.rb', line 29
def all
Dir[File.expand_path(File.join(File.dirname(__FILE__),'formats','*.rb'))].collect{|f| File.basename(f,'.rb').downcase }
end
|
.available?(format) ⇒ Boolean
33
34
35
|
# File 'lib/trocla/formats.rb', line 33
def available?(format)
all.include?(format.downcase)
end
|