Sha256: ac346e9eab1a15c17df51553cfd091fc779cd2932710f0f134498a5cb793a6c6

Contents?: true

Size: 462 Bytes

Versions: 11

Compression:

Stored size: 462 Bytes

Contents

module HackerOne
  module Client
    class Bounty
      delegate(
        :amount,
        :bonus_amount,
        :awarded_amount,
        :awarded_bonus_amount,
        :awarded_currency,
        :created_at,
        to: :attributes
      )

      def initialize(bounty)
        @bounty = bounty
      end

      def id
        @bounty[:id]
      end

      private

      def attributes
        OpenStruct.new(@bounty[:attributes])
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hackerone-client-0.15.0 lib/hackerone/client/bounty.rb
hackerone-client-0.14.2 lib/hackerone/client/bounty.rb
hackerone-client-0.14.1 lib/hackerone/client/bounty.rb
hackerone-client-0.14.0 lib/hackerone/client/bounty.rb
hackerone-client-0.13.0 lib/hackerone/client/bounty.rb
hackerone-client-0.12.0 lib/hackerone/client/bounty.rb
hackerone-client-0.11.0 lib/hackerone/client/bounty.rb
hackerone-client-0.10.0 lib/hackerone/client/bounty.rb
hackerone-client-0.9.1 lib/hackerone/client/bounty.rb
hackerone-client-0.9.0 lib/hackerone/client/bounty.rb
hackerone-client-0.8.0 lib/hackerone/client/bounty.rb