Class: Namesies::Reporter
- Inherits:
-
Object
- Object
- Namesies::Reporter
- Defined in:
- lib/namesies/reporter.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title) ⇒ Reporter
constructor
A new instance of Reporter.
- #recommendation(rec) ⇒ Object
- #result(result, color) ⇒ Object
Constructor Details
#initialize(title) ⇒ Reporter
Returns a new instance of Reporter.
7 8 9 |
# File 'lib/namesies/reporter.rb', line 7 def initialize(title) @title = title end |
Instance Attribute Details
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/namesies/reporter.rb', line 5 def title @title end |
Instance Method Details
#recommendation(rec) ⇒ Object
16 17 18 |
# File 'lib/namesies/reporter.rb', line 16 def recommendation(rec) puts " " + rec end |
#result(result, color) ⇒ Object
11 12 13 14 |
# File 'lib/namesies/reporter.rb', line 11 def result(result, color) color ||= 'white' puts " #{@title}: " + result.send(color) end |