Railsでモジュールを使う ref: http://qiita.com/dshim/items/b21b9411c47842e8a1ae