Eto

Get Eto (Japanese Zodiac) name or emoji.

Gem Version Build Status Coverage Status

Installation

Add this line to your application's Gemfile:

gem 'eto'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ruboty-articlegen

Commands (Command Line)

name args memo
names -- 全ての十二支を配列で返却
name year, japanese_zodiac year の 十干十二支 or 十二支名を取得
emoji year year に対応する十二支の emoji を取得

Usage ( Command Line Interface)

names

$ eto names
子丑寅卯辰巳午未申酉戌亥

name year

$ eto name 1977
巳
$ eto name 1978
午
$ eto name 1965 --not-japanese_zodiac
丁巳
$ eto name 1977 --not-japanese_zodiac
乙巳

emoji year

$ eto emoji 1977
:snake:
$ eto emoji 1978
:horse:

Usage ( require gem )

Eto.names

require 'eto'
Eto.names #=> ['子', '丑', '寅', '卯', '辰', '巳', '午', '未', '申', '酉', '戌', '亥']

Eto.eto_hash

require 'eto'
Eto.eto_hash
__END__

Eto.name(year)

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) #=> '戊午'

Eto.emoji(year)

require 'eto'
Eto.emoji(1977) #=> ':snake:'
Eto.emoji(1978) #=> ':horse:'

Contributing

  1. Fork it ( https://github.com/tbpgr/eto/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Reques