Class: TuwienLogon::UserInfo
- Inherits:
-
Object
- Object
- TuwienLogon::UserInfo
- Defined in:
- lib/tuwien_logon/user_info.rb
Instance Attribute Summary collapse
-
#info ⇒ Object
Returns the value of attribute info.
-
#params ⇒ Object
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params = []) ⇒ UserInfo
constructor
A new instance of UserInfo.
- #method_missing(param, *args) ⇒ Object
Constructor Details
#initialize(params = []) ⇒ UserInfo
Returns a new instance of UserInfo.
12 13 14 15 |
# File 'lib/tuwien_logon/user_info.rb', line 12 def initialize(params = []) @params = params @info = {} end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(param, *args) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/tuwien_logon/user_info.rb', line 17 def method_missing(param, *args) if param.to_s[-1] == '=' setter = true param = param.to_s[0..-2].to_sym end if params.include? param info[param] = args[0] if setter info[param] else super(param, args); end end |
Instance Attribute Details
#info ⇒ Object
Returns the value of attribute info.
3 4 5 |
# File 'lib/tuwien_logon/user_info.rb', line 3 def info @info end |
#params ⇒ Object
Returns the value of attribute params.
3 4 5 |
# File 'lib/tuwien_logon/user_info.rb', line 3 def params @params end |
Class Method Details
.find_by_oid(oid) ⇒ Object
6 7 8 9 |
# File 'lib/tuwien_logon/user_info.rb', line 6 def find_by_oid(oid) request = TuwienLogon::UserInfoRequest.new request.get_user_info :oid => oid end |