Method: Vines::User#initialize
- Defined in:
- lib/vines/user.rb
#initialize(args = {}) ⇒ User
Returns a new instance of User.
10 11 12 13 14 15 16 17 |
# File 'lib/vines/user.rb', line 10 def initialize(args={}) @jid = JID.new(args[:jid]) raise ArgumentError, 'invalid jid' if @jid.empty? @name = args[:name] @password = args[:password] @roster = args[:roster] || [] end |