def exnum(definitions)
      divided_definitions = definitions.inject({enums: {}, params: {}}) do |ret, (name, values)|
        if !values.kind_of?(Hash)
          ret[:enums][name]  = values
        else
          ret[:enums][name]  = extract_enums(name, values)
          ret[:params][name] = extract_params(name, values)
        end
        ret
      end

      enum(divided_definitions[:enums])
      enum_i18n(divided_definitions[:enums])
      enum_param(divided_definitions[:params])
    end
def exnum(definitions)
      divided_definitions = definitions.inject({enums: {}, params: {}}) do |ret, (name, values)|
        if !values.kind_of?(Hash)
          ret[:enums][name]  = values
        else
          ret[:enums][name]  = extract_enums(name, values)
          ret[:params][name] = extract_params(name, values)
        end
        ret
      end

      enum(divided_definitions[:enums])
      enum_i18n(divided_definitions[:enums])
      enum_param(divided_definitions[:params])
    end
--------------------------------------------------------------------------