Sha256: 5da6e74ef6db80d4e9da98d0f75d25932a2643a4fea63ea925c73170f5e28b31

Contents?: true

Size: 509 Bytes

Versions: 10

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

module HackerOne
  module Client
    class Member
      delegate :permissions, to: :attributes

      def initialize(member)
        @member = member
      end

      def user
        @user ||= User.new(relationships.user[:data])
      end

      def id
        @member[:id]
      end

      private

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

      def relationships
        OpenStruct.new(@member[:relationships])
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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