Class: Namesies::Reporter

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#titleObject

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