Class: HappyPerson
- Inherits:
-
Object
- Object
- HappyPerson
- Defined in:
- lib/happy_test_gem.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ HappyPerson
constructor
A new instance of HappyPerson.
- #mood ⇒ Object
Constructor Details
#initialize(name) ⇒ HappyPerson
Returns a new instance of HappyPerson.
6 7 8 |
# File 'lib/happy_test_gem.rb', line 6 def initialize name @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/happy_test_gem.rb', line 4 def name @name end |
Instance Method Details
#mood ⇒ Object
10 11 12 |
# File 'lib/happy_test_gem.rb', line 10 def mood "#{name} is always HAPPY!!" end |