Sha256: fd7d3300bab466c00eea50e791687c97d2c988a9837f223906a3cd2c3ae7e174

Contents?: true

Size: 478 Bytes

Versions: 16

Compression:

Stored size: 478 Bytes

Contents

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

16 entries across 16 versions & 1 rubygems

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