Class: HornOfPlenty::Models::Card
- Inherits:
-
Object
- Object
- HornOfPlenty::Models::Card
- Includes:
- Parsable
- Defined in:
- lib/horn_of_plenty/models/card.rb
Instance Attribute Summary
Attributes included from Parsable
Instance Method Summary collapse
Methods included from Parsable
Instance Method Details
#labels ⇒ Object
22 23 24 |
# File 'lib/horn_of_plenty/models/card.rb', line 22 def labels @labels || [] end |
#status ⇒ Object
26 27 28 |
# File 'lib/horn_of_plenty/models/card.rb', line 26 def status @status || nil end |
#to_h ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/horn_of_plenty/models/card.rb', line 30 def to_h { id: id, lane_id: lane_id, repository: repository, status: status, content_type: content_type, content_id: content_id, title: title, description: description, labels: labels, created_at: created_at, updated_at: updated_at, } end |
#to_sha ⇒ Object
46 47 48 |
# File 'lib/horn_of_plenty/models/card.rb', line 46 def to_sha @sha ||= Digest::SHA2.hexdigest(to_h.to_s) end |