Class: SlightlyAmusedPerson

Inherits:
Object
  • Object
show all
Defined in:
lib/slightlyamused_test_gem.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ SlightlyAmusedPerson

Returns a new instance of SlightlyAmusedPerson.



6
7
8
# File 'lib/slightlyamused_test_gem.rb', line 6

def initialize name
@name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/slightlyamused_test_gem.rb', line 4

def name
  @name
end

Instance Method Details

#moodObject



10
11
12
# File 'lib/slightlyamused_test_gem.rb', line 10

def mood
  "#{name} is always Slightly Amused"
end