Elixir语言中 Module.delete_attribute
相关用法介绍如下。
用法:
delete_attribute(module, key)
@spec delete_attribute(module(), atom()) :: term()
删除与给定键匹配的模块属性。
它返回已删除的属性值(如果未设置,则返回 nil
)。
例子
defmodule MyModule do
Module.put_attribute(__MODULE__, :custom_threshold_for_lib, 10)
Module.delete_attribute(__MODULE__, :custom_threshold_for_lib)
end
相关用法
- Elixir Module.defines?用法及代码示例
- Elixir Module.definitions_in用法及代码示例
- Elixir Module.concat用法及代码示例
- Elixir Module.eval_quoted用法及代码示例
- Elixir Module.put_attribute用法及代码示例
- Elixir Module.split用法及代码示例
- Elixir Module.overridables_in用法及代码示例
- Elixir Module.has_attribute?用法及代码示例
- Elixir Module.get_attribute用法及代码示例
- Elixir Module.reserved_attributes用法及代码示例
- Elixir Module.register_attribute用法及代码示例
- Elixir Module.create用法及代码示例
- Elixir Module.safe_concat用法及代码示例
- Elixir Module.attributes_in用法及代码示例
- Elixir Module用法及代码示例
- Elixir Map.keys用法及代码示例
- Elixir Map.values用法及代码示例
- Elixir Map.update用法及代码示例
- Elixir MapSet用法及代码示例
- Elixir Map.split用法及代码示例
- Elixir MapSet.intersection用法及代码示例
- Elixir Map.put_new_lazy用法及代码示例
- Elixir Map.drop用法及代码示例
- Elixir Macro.Env.fetch_alias用法及代码示例
- Elixir Map用法及代码示例
注:本文由纯净天空筛选整理自elixir-lang.org大神的英文原创作品 Module.delete_attribute(module, key)。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。