Sha256: cda359c670225ef60e8a75fa0d8667cd823fbc65744275267c084ca0383fff42
Contents?: true
Size: 535 Bytes
Versions: 13
Compression:
Stored size: 535 Bytes
Contents
module Lingohub module Models class Collaborator attr_accessor :email, :display_name, :roles ROLES_NAMES = { "project_admin" => "Project admin", "developer" => "Developer" } def initialize(client, link) @client = client @link = link end def destroy @client.delete @link end def permissions return "None" if self.roles.nil? or self.roles.empty? self.roles.find_all { |role| ROLES_NAMES.has_key?(role) }.join(", ") end end end end
Version data entries
13 entries across 13 versions & 1 rubygems