Class: ActiveSP::User
- Extended by:
- Caching, PersistentCaching
- Defined in:
- lib/activesp/user.rb
Instance Attribute Summary collapse
- #login_name ⇒ Object readonly
Instance Method Summary collapse
-
#initialize(site, login_name, attributes_before_type_cast = nil) ⇒ User
constructor
A new instance of User.
-
#key ⇒ String
See Base#key.
-
#save ⇒ void
See Base#save.
- #to_s ⇒ Object (also: #inspect)
Methods included from Caching
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, login_name, attributes_before_type_cast = nil) @site, @login_name = site, login_name @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_name ⇒ Object (readonly)
36 37 38 |
# File 'lib/activesp/user.rb', line 36 def login_name @login_name end |
Instance Method Details
#key ⇒ String
See Base#key
47 48 49 |
# File 'lib/activesp/user.rb', line 47 def key encode_key("U", [@login_name]) end |
#save ⇒ void
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_s ⇒ Object Also known as: inspect
58 59 60 |
# File 'lib/activesp/user.rb', line 58 def to_s "#<ActiveSP::User login_name=#{login_name}>" end |