class HackerOne::Client::Activities::BountyAwarded

Public Instance Methods

bonus_amount() click to toggle source
# 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() click to toggle source
# 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