Class: HackerOne::Client::Activities::BountyAwarded
- Defined in:
- lib/hackerone/client/activity.rb
Instance Method Summary collapse
Methods inherited from Activity
#attachments, #initialize, #internal?
Constructor Details
This class inherits a constructor from HackerOne::Client::Activities::Activity
Instance Method Details
#bonus_amount ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/hackerone/client/activity.rb', line 51 def bonus_amount formatted_bonus_amount = attributes.bonus_amount || "0" if ENV[HackerOne::Client::LENIENT_MODE_ENV_VARIABLE] Float(formatted_bonus_amount) rescue 0 else begin Float(formatted_bonus_amount) rescue ArgumentError raise ArgumentError.new("Improperly formatted bonus amount") end end end |
#bounty_amount ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/hackerone/client/activity.rb', line 38 def bounty_amount formatted_bounty_amount = attributes.bounty_amount || "0" if ENV[HackerOne::Client::LENIENT_MODE_ENV_VARIABLE] Float(formatted_bounty_amount) rescue 0 else begin Float(formatted_bounty_amount) rescue ArgumentError raise ArgumentError.new("Improperly formatted bounty amount") end end end |