Class: Rubiderella::Person::Birthday
- Inherits:
-
Object
- Object
- Rubiderella::Person::Birthday
- Defined in:
- lib/rubiderella/person/birthday.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#day ⇒ Object
readonly
Returns the value of attribute day.
-
#month ⇒ Object
readonly
Returns the value of attribute month.
Instance Method Summary collapse
- #date ⇒ Object
-
#initialize(args) ⇒ Birthday
constructor
A new instance of Birthday.
Constructor Details
#initialize(args) ⇒ Birthday
Returns a new instance of Birthday.
8 9 10 11 |
# File 'lib/rubiderella/person/birthday.rb', line 8 def initialize(args) @month = args[:month] @day = args[:day] end |
Instance Attribute Details
#day ⇒ Object (readonly)
Returns the value of attribute day.
6 7 8 |
# File 'lib/rubiderella/person/birthday.rb', line 6 def day @day end |
#month ⇒ Object (readonly)
Returns the value of attribute month.
6 7 8 |
# File 'lib/rubiderella/person/birthday.rb', line 6 def month @month end |
Instance Method Details
#date ⇒ Object
13 14 15 |
# File 'lib/rubiderella/person/birthday.rb', line 13 def date "#{@month}月#{@day}日" end |