class BerkeleyLibrary::TIND::API::Format

Public Class Methods

ensure_format(format) click to toggle source
# File lib/berkeley_library/tind/api/format.rb, line 19
def ensure_format(format)
  return unless format
  return format if format.is_a?(Format)

  fmt = Format.find_by_value(format.to_s.downcase)
  return fmt if fmt

  raise ArgumentError, "Unknown #{Format}: #{format.inspect}"
end

Public Instance Methods

to_s() click to toggle source
# File lib/berkeley_library/tind/api/format.rb, line 9
def to_s
  # noinspection RubyYardReturnMatch
  value
end
to_str() click to toggle source
# File lib/berkeley_library/tind/api/format.rb, line 14
def to_str
  value
end