Class: MiniProgram::User

Inherits:
Object
  • Object
show all
Defined in:
lib/mini_program/user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(open_id: :blank_open_id, nickname: :blank_nickname, phone_num: :blank_phone_num, session_key: :blank_session_key, options: nil) ⇒ User

Returns a new instance of User.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/mini_program/user.rb', line 5

def initialize(open_id: :blank_open_id,
               nickname: :blank_nickname,
               phone_num: :blank_phone_num,
               session_key: :blank_session_key,
               options: nil)
  @open_id = open_id
  @nickname = nickname
  @phone_num = phone_num
  @session_key = session_key
  @options = options
end

Instance Attribute Details

#nicknameObject

Returns the value of attribute nickname.



3
4
5
# File 'lib/mini_program/user.rb', line 3

def nickname
  @nickname
end

#open_idObject

Returns the value of attribute open_id.



3
4
5
# File 'lib/mini_program/user.rb', line 3

def open_id
  @open_id
end

#optionsObject

Returns the value of attribute options.



3
4
5
# File 'lib/mini_program/user.rb', line 3

def options
  @options
end

#phone_numObject

Returns the value of attribute phone_num.



3
4
5
# File 'lib/mini_program/user.rb', line 3

def phone_num
  @phone_num
end

#session_keyObject

Returns the value of attribute session_key.



3
4
5
# File 'lib/mini_program/user.rb', line 3

def session_key
  @session_key
end