Class: SlingUsers::Principal
- Inherits:
-
Object
- Object
- SlingUsers::Principal
- Defined in:
- lib/nakamura/users.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name) ⇒ Principal
constructor
A new instance of Principal.
- #message_path_for(sling, messageid, mailbox) ⇒ Object
-
#private_path_for(sling) ⇒ Object
Get the private path for a user.
-
#public_path_for(sling) ⇒ Object
Get the public path for a user.
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
#name ⇒ Object
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 (sling,,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}/#{}" 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 |