Class: Wedding::Groom
- Inherits:
-
Object
- Object
- Wedding::Groom
- Defined in:
- lib/wedding/groom.rb
Overview
No wedding without a groom
Instance Attribute Summary collapse
-
#about ⇒ Object
Returns the value of attribute about.
-
#email ⇒ Object
Returns the value of attribute email.
-
#name ⇒ Object
Returns the value of attribute name.
-
#occupation ⇒ Object
Returns the value of attribute occupation.
Instance Method Summary collapse
-
#initialize(config) ⇒ Groom
constructor
Get him ready for all pomp and show.
-
#to_s ⇒ Object
Overriding for pretty printing.
Constructor Details
#initialize(config) ⇒ Groom
Get him ready for all pomp and show
5 6 7 8 9 10 |
# File 'lib/wedding/groom.rb', line 5 def initialize(config) self.name = config[:groom_name] self.about = config[:groom_about] self.occupation = config[:groom_occupation] self.email = config[:groom_email] end |
Instance Attribute Details
#about ⇒ Object
Returns the value of attribute about.
25 26 27 |
# File 'lib/wedding/groom.rb', line 25 def about @about end |
#email ⇒ Object
Returns the value of attribute email.
25 26 27 |
# File 'lib/wedding/groom.rb', line 25 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/wedding/groom.rb', line 25 def name @name end |
#occupation ⇒ Object
Returns the value of attribute occupation.
25 26 27 |
# File 'lib/wedding/groom.rb', line 25 def occupation @occupation end |
Instance Method Details
#to_s ⇒ Object
Overriding for pretty printing
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/wedding/groom.rb', line 13 def to_s groom_gungaan = %Q[ ========= Groom ========== The groom's name is #{self.name} He is a #{self.about} He works as a #{self.occupation} If you want to contact him, his email ID is #{self.email} ] end |