Class: Remitmd::BountySubmission
Instance Attribute Summary collapse
-
#accepted ⇒ Object
(also: #status)
readonly
Returns the value of attribute accepted.
-
#bounty_id ⇒ Object
readonly
Returns the value of attribute bounty_id.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#evidence_uri ⇒ Object
(also: #evidence_hash)
readonly
Returns the value of attribute evidence_uri.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#submitter ⇒ Object
readonly
Returns the value of attribute submitter.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ BountySubmission
constructor
A new instance of BountySubmission.
Methods inherited from Model
Constructor Details
#initialize(attrs) ⇒ BountySubmission
Returns a new instance of BountySubmission.
310 311 312 313 314 315 316 317 318 |
# File 'lib/remitmd/models.rb', line 310 def initialize(attrs) h = attrs.transform_keys(&:to_s) @id = h["id"] @bounty_id = h["bounty_id"] @submitter = h["submitter"] @evidence_uri = h["evidence_uri"] || h["evidence_hash"] @accepted = h.key?("accepted") ? h["accepted"] : h["status"] @created_at = parse_time(h["created_at"]) end |
Instance Attribute Details
#accepted ⇒ Object (readonly) Also known as: status
Returns the value of attribute accepted.
320 321 322 |
# File 'lib/remitmd/models.rb', line 320 def accepted @accepted end |
#bounty_id ⇒ Object (readonly)
Returns the value of attribute bounty_id.
320 321 322 |
# File 'lib/remitmd/models.rb', line 320 def bounty_id @bounty_id end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
320 321 322 |
# File 'lib/remitmd/models.rb', line 320 def created_at @created_at end |
#evidence_uri ⇒ Object (readonly) Also known as: evidence_hash
Returns the value of attribute evidence_uri.
320 321 322 |
# File 'lib/remitmd/models.rb', line 320 def evidence_uri @evidence_uri end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
320 321 322 |
# File 'lib/remitmd/models.rb', line 320 def id @id end |
#submitter ⇒ Object (readonly)
Returns the value of attribute submitter.
320 321 322 |
# File 'lib/remitmd/models.rb', line 320 def submitter @submitter end |