Class: ActiveSP::User

Inherits:
Base
  • Object
show all
Extended by:
Caching, PersistentCaching
Includes:
InSite, Util
Defined in:
lib/activesp/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#attribute, #attribute_type, #attribute_types, #attributes, #has_attribute?, #has_writable_attribute?, #method_missing, #reload, #set_attribute

Constructor Details

#initialize(site, login_name, attributes_before_type_cast = nil) ⇒ User

Returns a new instance of User.



40
41
42
43
# File 'lib/activesp/user.rb', line 40

def initialize(site, , attributes_before_type_cast = nil)
  @site, @login_name = site, 
  @attributes_before_type_cast = attributes_before_type_cast if attributes_before_type_cast
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveSP::Base

Instance Attribute Details

#login_nameObject (readonly)



36
37
38
# File 'lib/activesp/user.rb', line 36

def 
  @login_name
end

Instance Method Details

#keyString

See Base#key

Returns:

  • (String)


47
48
49
# File 'lib/activesp/user.rb', line 47

def key
  encode_key("U", [@login_name])
end

#savevoid

This method returns an undefined value.

See Base#save



53
54
55
# File 'lib/activesp/user.rb', line 53

def save
  p untype_cast_attributes(@site, nil, internal_attribute_types, changed_attributes)
end

#to_sObject Also known as: inspect



58
59
60
# File 'lib/activesp/user.rb', line 58

def to_s
  "#<ActiveSP::User login_name=#{}>"
end