Class: PrEntry

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row) ⇒ PrEntry

Returns a new instance of PrEntry.



8
9
10
11
12
13
14
15
16
17
# File 'lib/jirametrics/github_pr_scatterplot.rb', line 8

def initialize row
  @created_at = Time.parse(row['Created At (UTC)']).getlocal('-05:00')
  @closed_at  = Time.parse(row['Closed At (UTC)']).getlocal('-05:00')
  @hours_to_first_review = row['Time to First Review (hrs)']
  @pr_number = row['PR Number']

  @days = ((closed_at - created_at) / 3600.0 / 24).ceil
  @repo = row['Repo']
  @title = row['Title']
end

Instance Attribute Details

#closed_atObject (readonly)

Returns the value of attribute closed_at.



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

def closed_at
  @closed_at
end

#created_atObject (readonly)

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#daysObject (readonly)

Returns the value of attribute days.



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

def days
  @days
end

#hours_to_first_reviewObject (readonly)

Returns the value of attribute hours_to_first_review.



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

def hours_to_first_review
  @hours_to_first_review
end

#pr_numberObject (readonly)

Returns the value of attribute pr_number.



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

def pr_number
  @pr_number
end

#repoObject (readonly)

Returns the value of attribute repo.



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

def repo
  @repo
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end