Class: SlingUsers::Principal

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

Direct Known Subclasses

Group, User

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Principal

Returns a new instance of Principal.



18
19
20
# File 'lib/nakamura/users.rb', line 18

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



16
17
18
# File 'lib/nakamura/users.rb', line 16

def name
  @name
end

Instance Method Details

#message_path_for(sling, messageid, mailbox) ⇒ Object



33
34
35
36
# File 'lib/nakamura/users.rb', line 33

def message_path_for(sling,messageid,mailbox)
  #return home_path_for(sling) + "/message/"+messageid[0,2]+"/"+messageid[2,2]+"/"+messageid[4,2]+"/"+messageid[6,2]+"/"+messageid
  return home_path_for(sling) + "/message/#{mailbox}/#{messageid}"
end

#private_path_for(sling) ⇒ Object

Get the private path for a user



29
30
31
# File 'lib/nakamura/users.rb', line 29

def private_path_for(sling)
  return home_path_for(sling) + "/private"
end

#public_path_for(sling) ⇒ Object

Get the public path for a user



24
25
26
# File 'lib/nakamura/users.rb', line 24

def public_path_for(sling)
  return home_path_for(sling) + "/public"
end