Module: Nizicon::Members::Util
- Included in:
- KinoshitaHiyori, MatobaKarin, NagataMinari, NakamuraAkari, NemotoNagi, NishiNanami, OkumuraNonoka, ShigematsuYuka, SuyamaEmiri, TsurumiMoe, YoshimuraNana
- Defined in:
- lib/nizicon/members.rb
Instance Method Summary collapse
Instance Method Details
#age(current_date = Date.today) ⇒ Object
12 13 14 |
# File 'lib/nizicon/members.rb', line 12 def age current_date = Date.today current_date.year - birthday.year - (current_date.yday < birthday.yday ? 1 : 0) end |
#to_hash ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/nizicon/members.rb', line 16 def to_hash public_methods(false).inject({}) do |h, m| h[m] = public_send(m) h end end |