Sha256: 9aa963d6fd6661b01e4d9039fbbd5e0621296606d115fab871032cfdf2fe6959

Contents?: true

Size: 513 Bytes

Versions: 1

Compression:

Stored size: 513 Bytes

Contents

module Scrivito

  # @api beta
  # Represents a Membership of a {User} in a {Workspace}
  class Membership

    # @api beta
    # The {User User's} id
    #
    # @return [String]
    attr_reader :user_id

    # @api beta
    # The role associated with this membership.
    #
    # @note Currently the only available role is "owner".
    #
    # @return [String] the name of role
    attr_reader :role

    def initialize(user_id, data)
      @user_id = user_id
      @role = data.fetch("role")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scrivito_sdk-0.17.0 lib/scrivito/membership.rb