lib/make_exportable/core.rb
# <tt>validate_export_format</tt> ensures that the requested export format is valid.
validate_export_format ensures that the requested export format is valid.
validate_export_format ensures that the requested export format is valid .
def validate_export_format(format)
        unless MakeExportable.exportable_formats.keys.include?(format.to_sym)
          raise MakeExportable::FormatNotFound.new("#{format} is not a supported format.")
        end
        unless exportable_options[:formats].include?(format.to_sym)
          raise MakeExportable::FormatNotFound.new("#{format} format is not allowed on this class.")
        end
      end
def validate_export_format ( format ) unless MakeExportable . exportable_formats . keys . include? ( format . to_sym ) raise MakeExportable :: FormatNotFound . new ( "#{format} is not a supported format." ) end unless exportable_options [ :formats ] . include? ( format . to_sym ) raise MakeExportable :: FormatNotFound . new ( "#{format} format is not allowed on this class." ) end end
<tt>validate_export_format</tt> ensures that the requested export format is valid.
<tt > validate_export_format< / tt > ensures that the requested export format is valid .
format
<not_specific>