lib/scrivito/membership.rb in scrivito_sdk-0.66.0 vs lib/scrivito/membership.rb in scrivito_sdk-0.70.0.rc1
- old
+ new
@@ -1,9 +1,9 @@
module Scrivito
# @api public
- # Represents a Membership of a {User} in a {Workspace}
+ # Represents a Membership of a {User} in a {Workspace}.
class Membership
# @api public
# The {User User's} id
#
@@ -13,11 +13,11 @@
# @api public
# The role associated with this membership.
#
# @note Currently the only available role is "owner".
#
- # @return [String] the name of role
+ # @return [String] the name of the role
attr_reader :role
def initialize(user_id, data)
@user_id = user_id
@role = data.fetch("role")
@@ -26,10 +26,10 @@
# Fetches and returns the {User} with the id {Membership#user_id}.
# Uses the proc set in {Configuration.find_user} to fetch the user.
# @api public
# @return The value returned by the proc set in {Configuration.find_user}.
# @return An unknown user if no proc is set in {Configuration.find_user} or the proc returns a
- # falsy value. The unknown user will have the id of the original user and no abilities.
+ # falsy value. The unknown user will have the id of the original user and no capabilities.
# @see Scrivito::Configuration.find_user
def user
User.find(user_id) || User.unknown_user(user_id)
end
end