Class: Shiftzilla::SnapData

Inherits:
Object
  • Object
show all
Defined in:
lib/shiftzilla/snap_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(snapshot) ⇒ SnapData

Returns a new instance of SnapData.



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/shiftzilla/snap_data.rb', line 6

def initialize(snapshot)
  @id          = snapshot
  @bug_ids     = []
  @tb_ids      = []
  @cc_ids      = []
  @new_bugs    = 0
  @closed_bugs = 0
  @new_tb      = 0
  @closed_tb   = 0
  @new_cc      = 0
  @closed_cc   = 0
end

Instance Attribute Details

#bug_idsObject

Returns the value of attribute bug_ids.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def bug_ids
  @bug_ids
end

#cc_idsObject

Returns the value of attribute cc_ids.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def cc_ids
  @cc_ids
end

#closed_bugsObject

Returns the value of attribute closed_bugs.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def closed_bugs
  @closed_bugs
end

#closed_ccObject

Returns the value of attribute closed_cc.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def closed_cc
  @closed_cc
end

#closed_tbObject

Returns the value of attribute closed_tb.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def closed_tb
  @closed_tb
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/shiftzilla/snap_data.rb', line 3

def id
  @id
end

#new_bugsObject

Returns the value of attribute new_bugs.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def new_bugs
  @new_bugs
end

#new_ccObject

Returns the value of attribute new_cc.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def new_cc
  @new_cc
end

#new_tbObject

Returns the value of attribute new_tb.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def new_tb
  @new_tb
end

#tb_idsObject

Returns the value of attribute tb_ids.



4
5
6
# File 'lib/shiftzilla/snap_data.rb', line 4

def tb_ids
  @tb_ids
end

Instance Method Details

#total_bugsObject



19
20
21
# File 'lib/shiftzilla/snap_data.rb', line 19

def total_bugs
  @bug_ids.length
end

#total_ccObject



27
28
29
# File 'lib/shiftzilla/snap_data.rb', line 27

def total_cc
  @cc_ids.length
end

#total_tbObject



23
24
25
# File 'lib/shiftzilla/snap_data.rb', line 23

def total_tb
  @tb_ids.length
end