Class: Wedding::Bride
- Inherits:
-
Object
- Object
- Wedding::Bride
- Defined in:
- lib/wedding/bride.rb
Overview
No wedding without a bride
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) ⇒ Bride
constructor
Get her ready for all the jazz and buzz.
-
#to_s ⇒ Object
Overriding for pretty printing.
Constructor Details
#initialize(config) ⇒ Bride
Get her ready for all the jazz and buzz
5 6 7 8 9 10 |
# File 'lib/wedding/bride.rb', line 5 def initialize(config) self.name = config[:bride_name] self.about = config[:bride_about] self.occupation = config[:bride_occupation] self.email = config[:bride_email] end |
Instance Attribute Details
#about ⇒ Object
Returns the value of attribute about.
25 26 27 |
# File 'lib/wedding/bride.rb', line 25 def about @about end |
#email ⇒ Object
Returns the value of attribute email.
25 26 27 |
# File 'lib/wedding/bride.rb', line 25 def email @email end |
#name ⇒ Object
Returns the value of attribute name.
25 26 27 |
# File 'lib/wedding/bride.rb', line 25 def name @name end |
#occupation ⇒ Object
Returns the value of attribute occupation.
25 26 27 |
# File 'lib/wedding/bride.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/bride.rb', line 13 def to_s bride_gungaan = %Q[ ========= Bride ========== The bride's name is #{self.name} She is a #{self.about} She works as #{self.occupation} If you want to contact her, her email ID is #{self.email} ] end |