Elixir: 1.5.1, Phoenix: 1.3.0 Python ではメソッドの前に @hoge を書いてメソッド定義の挙動を変えられる。 class Foo: def i_am_instance_method(self): print('hi') @staticmethod def i_am_static_method(): print('yo') defmodule OnDefinition do def on_definition(env, _kind, _name, _args, _guards, _body) do Module.put_attribute(env.module, :my_func_attr, nil) end end defmodule Foo do # Foo モジュール内で関数を定義したタイミングで呼ばれるフックを指定する。 @on_definiti