Class: Neoneo::Member

Inherits:
Object
  • Object
show all
Defined in:
lib/neoneo.rb

Overview

Representation of No Kahuna users who are members of a project.

This class is different to the User class! While a Neoneo::User describes a No Kahuna user from which you know the login credentials to No Kahuna a Neoneo::Member represents a No Kahuna user only with all the information you can get about it by sharing a project with your Neoneo::User. As you can imagine this is again a read-only class so no changes can be made (how should they, you don’t know the member’s password by definition!) And yes, even your Neoneo::User will be represented as a Neoneo::Member When you call Project#members. This is to avoid any confusion by dealing with two different classes with different abilities in one and the same array.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, project) ⇒ Member

Returns a new instance of Member.



409
410
411
412
413
# File 'lib/neoneo.rb', line 409

def initialize(id, name, project)
  @id      = id
  @name    = name
  @project = project
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



407
408
409
# File 'lib/neoneo.rb', line 407

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



407
408
409
# File 'lib/neoneo.rb', line 407

def name
  @name
end