Class: CoPilot::BuildTableRow
- Inherits:
-
Object
- Object
- CoPilot::BuildTableRow
- Defined in:
- lib/copilot/requests/internal/build_table_row.rb
Instance Method Summary collapse
- #added_date ⇒ Object
- #build_id ⇒ Object
- #built_for ⇒ Object
- #crashes ⇒ Object
- #feedback ⇒ Object
-
#initialize(tr) ⇒ BuildTableRow
constructor
A new instance of BuildTableRow.
- #installs ⇒ Object
- #sdk ⇒ Object
- #size ⇒ Object
- #to_hash ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(tr) ⇒ BuildTableRow
Returns a new instance of BuildTableRow.
6 7 8 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 6 def initialize(tr) @tr = tr end |
Instance Method Details
#added_date ⇒ Object
18 19 20 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 18 def added_date Time.parse @tr[2].text end |
#build_id ⇒ Object
10 11 12 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 10 def build_id @tr.id.split('/').last end |
#built_for ⇒ Object
22 23 24 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 22 def built_for @tr[3].text end |
#crashes ⇒ Object
34 35 36 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 34 def crashes @tr[6].text.to_i end |
#feedback ⇒ Object
38 39 40 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 38 def feedback @tr[7].text.to_i end |
#installs ⇒ Object
42 43 44 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 42 def installs @tr[8].text.to_i end |
#sdk ⇒ Object
30 31 32 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 30 def sdk @tr[5].text end |
#size ⇒ Object
26 27 28 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 26 def size @tr[4].text end |
#to_hash ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 46 def to_hash { id: build_id, version: version, added_date: added_date, built_for: built_for, size: size, sdk: sdk, crashes: crashes, feedback: feedback, installs: installs } end |
#version ⇒ Object
14 15 16 |
# File 'lib/copilot/requests/internal/build_table_row.rb', line 14 def version @tr[1].text end |