module Unparser::Util

def self.one(array)

Returns:
  • (Object) - first entry

Parameters:
  • array (Array) --
def self.one(array)
  case array
  in [value]
    value
  else
    fail SizeError, "expected size to be exactly 1 but size was #{array.size}"
  end
end