Class: KStor::LoginRequest
Overview
A user authentication request.
Instance Attribute Summary collapse
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Attributes inherited from Message
Instance Method Summary collapse
-
#initialize(login, password, type, args) ⇒ LoginRequest
constructor
A new instance of LoginRequest.
- #inspect ⇒ Object
- #to_h ⇒ Object
Methods inherited from Message
Constructor Details
#initialize(login, password, type, args) ⇒ LoginRequest
Returns a new instance of LoginRequest.
62 63 64 65 66 |
# File 'lib/kstor/message.rb', line 62 def initialize(login, password, type, args) @login = login @password = password super(type, args) end |
Instance Attribute Details
#login ⇒ Object (readonly)
Returns the value of attribute login.
59 60 61 |
# File 'lib/kstor/message.rb', line 59 def login @login end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
60 61 62 |
# File 'lib/kstor/message.rb', line 60 def password @password end |
Instance Method Details
#inspect ⇒ Object
68 69 70 71 72 73 74 75 76 |
# File 'lib/kstor/message.rb', line 68 def inspect fmt = [ '#<KStor::LoginRequest:%<id>x', '@login=%<login>s', '@password="******"', '@args=%<args>s>' ].join(' ') format(fmt, id: object_id, login: @login.inspect, args: @args.inspect) end |
#to_h ⇒ Object
78 79 80 |
# File 'lib/kstor/message.rb', line 78 def to_h super.merge('login' => @login, 'password' => @password) end |