Class: Report

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReport

Returns a new instance of Report.



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

def initialize
  @summary = Request.new #blagging it.  doesn't have controller/action.
  @requests=[]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/report/report_parser.rb', line 2

def name
  @name
end

#requestsObject

Returns the value of attribute requests.



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

def requests
  @requests
end

#started_atObject

Returns the value of attribute started_at.



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

def started_at
  @started_at
end

#summaryObject

Returns the value of attribute summary.



5
6
7
# File 'lib/report/report_parser.rb', line 5

def summary
  @summary
end

Instance Method Details

#get_request_like(other) ⇒ Object



12
13
14
# File 'lib/report/report_parser.rb', line 12

def get_request_like(other)
  @requests.select { |r| r.controller == other.controller && r.action == other.action && r.verb==other.verb && r.format==other.format}.first
end

#to_sObject



15
16
17
# File 'lib/report/report_parser.rb', line 15

def to_s
  @name
end