Class: Streamliner::Report

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(controller_count, controller_list) ⇒ Report

Returns a new instance of Report.



6
7
8
9
10
# File 'lib/streamliner/report.rb', line 6

def initialize(controller_count, controller_list)
  @controller_count = controller_count
  @controller_list = controller_list
  @report = String.new
end

Instance Attribute Details

#controller_countObject (readonly)

Returns the value of attribute controller_count.



3
4
5
# File 'lib/streamliner/report.rb', line 3

def controller_count
  @controller_count
end

#controller_listObject (readonly)

Returns the value of attribute controller_list.



3
4
5
# File 'lib/streamliner/report.rb', line 3

def controller_list
  @controller_list
end

#controllers_by_useObject (readonly)

Returns the value of attribute controllers_by_use.



3
4
5
# File 'lib/streamliner/report.rb', line 3

def controllers_by_use
  @controllers_by_use
end

#reportObject

Returns the value of attribute report.



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

def report
  @report
end

Instance Method Details

#generateObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/streamliner/report.rb', line 12

def generate
  if data_recorded?
    add_start_date
    add_header
    add_usage
    add_unused_code
  else
    no_data_message
  end
  report
end