Sha256: 0a31c4954be4a6f267d2ebe0485c08835f65633063d3c8d097e6b3fb1bbac6e9

Contents?: true

Size: 510 Bytes

Versions: 9

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

module HackerOne
  module Client
    class StructuredScope
      DELEGATES = [
        :asset_identifier,
        :asset_type,
        :eligible_for_bounty,
        :eligible_for_submission,
        :instruction
      ]

      delegate *DELEGATES, to: :attributes

      def initialize(scope)
        @scope = scope
      end

      def id
        @scope[:id]
      end

      private

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hackerone-client-0.22.1 lib/hackerone/client/structured_scope.rb
hackerone-client-0.22.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.21.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.20.1 lib/hackerone/client/structured_scope.rb
hackerone-client-0.20.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.19.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.18.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.17.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.16.0 lib/hackerone/client/structured_scope.rb