Class: MyAge::CLI
Instance Attribute Summary collapse
-
#dob ⇒ Object
Returns the value of attribute dob.
Instance Method Summary collapse
Methods included from Calculator
#age, included, #method_missing
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MyAge::Calculator
Instance Attribute Details
#dob ⇒ Object
Returns the value of attribute dob.
7 8 9 |
# File 'lib/my_age/cli.rb', line 7 def dob @dob end |
Instance Method Details
#is ⇒ Object
13 14 15 16 17 |
# File 'lib/my_age/cli.rb', line 13 def is self.dob = get_date([:dob]) date = [:as_of].present? ? get_date([:as_of]) : Date.today puts age(date) end |