Module: Windows::Units::Converter::Formats
- Included in:
- Finder
- Defined in:
- lib/windows/units/converter.rb
Defined Under Namespace
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#format_for(format, *args) ⇒ Object
42 43 44 45 46 |
# File 'lib/windows/units/converter.rb', line 42 def format_for(format, *args) klass = SUPPORTED_FORMATS[format] raise "I only support this formats #{supported_formats}" unless klass klass.new(*args) end |
#supported_formats ⇒ Object
38 39 40 |
# File 'lib/windows/units/converter.rb', line 38 def supported_formats SUPPORTED_FORMATS.keys end |