Get Eto (Japanese Zodiac 🐭🐮🐯🐰🐉🐍🐴🐑🐒🐔🐶🐗 ) name or emoji.
Add this line to your application's Gemfile:
gem 'eto'And then execute:
$ bundle
Or install it yourself as:
$ gem install ruboty-articlegen| name | args | memo |
|---|---|---|
| names | -- | 全ての十二支を配列で返却 |
| name | year, japanese_zodiac | year の 十干十二支 or 十二支名を取得 |
| emoji | year | year に対応する十二支の emoji を取得 |
$ eto names
子丑寅卯辰巳午未申酉戌亥$ eto name 1977
巳
$ eto name 1978
午
$ eto name 1965 --not-japanese_zodiac
丁巳
$ eto name 1977 --not-japanese_zodiac
乙巳$ eto emoji 1977
:snake:
$ eto emoji 1978
:horse:require'eto'Eto.names#=> ['子', '丑', '寅', '卯', '辰', '巳', '午', '未', '申', '酉', '戌', '亥']require'eto'Eto.eto_hash
__END__
output
{
'子' => ':mouse:', '丑' => ':cow:', '寅' => ':tiger:', '卯' => ':rabbit:', '辰' => ':dragon:', '巳' => ':snake:', '午' => ':horse:', '未' => ':sheep:', '申' => ':monkey:', '酉' => ':chicken:', '戌' => ':dog:', '亥' => ':boar:'
}require'eto'Eto.name(1977)#=> '巳'Eto.name(1978)#=> '午'Eto.name(1965,true)#=> '巳'Eto.name(1977,true)#=> '巳'Eto.name(1978,true)#=> '午'Eto.name(1965,false)#=> '乙巳'Eto.name(1977,false)#=> '丁巳'Eto.name(1978,false)#=> '戊午'require'eto'Eto.emoji(1977)#=> ':snake:'Eto.emoji(1978)#=> ':horse:'- Fork it ( https://github.com/tbpgr/eto/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Reques

