Sha256: 87db5dd91911d60f1fd9fb815dbe259d9e0bcb83706af48f2b6e9cd8b4d36cbf

Contents?: true

Size: 479 Bytes

Versions: 15

Compression:

Stored size: 479 Bytes

Contents

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

15 entries across 15 versions & 1 rubygems

Version Path
hackerone-client-0.15.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.14.2 lib/hackerone/client/structured_scope.rb
hackerone-client-0.14.1 lib/hackerone/client/structured_scope.rb
hackerone-client-0.14.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.13.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.12.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.11.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.10.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.9.1 lib/hackerone/client/structured_scope.rb
hackerone-client-0.9.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.8.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.7.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.6.0 lib/hackerone/client/structured_scope.rb
hackerone-client-0.5.2 lib/hackerone/client/structured_scope.rb
hackerone-client-0.5.1 lib/hackerone/client/structured_scope.rb