Class: DataGenerator::Gen::User

Inherits:
Object
  • Object
show all
Defined in:
lib/howitzer/utils/data_generator/gen.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ User


110
111
112
113
114
115
116
117
118
# File 'lib/howitzer/utils/data_generator/gen.rb', line 110

def initialize(params={})
  @email = params.delete(:email)
  @email_name, @domain = @email.to_s.split('@')
  @login = params.delete(:login) || @email_name
  @password = params.delete(:password)
  @first_name = params.delete(:first_name)
  @last_name = params.delete(:last_name)
  @full_name = "#@first_name #@last_name"
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain


108
109
110
# File 'lib/howitzer/utils/data_generator/gen.rb', line 108

def domain
  @domain
end

#emailObject (readonly)

Returns the value of attribute email


108
109
110
# File 'lib/howitzer/utils/data_generator/gen.rb', line 108

def email
  @email
end

#first_nameObject (readonly)

Returns the value of attribute first_name


108
109
110
# File 'lib/howitzer/utils/data_generator/gen.rb', line 108

def first_name
  @first_name
end

#full_nameObject (readonly)

Returns the value of attribute full_name


108
109
110
# File 'lib/howitzer/utils/data_generator/gen.rb', line 108

def full_name
  @full_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name


108
109
110
# File 'lib/howitzer/utils/data_generator/gen.rb', line 108

def last_name
  @last_name
end

#loginObject (readonly)

Returns the value of attribute login


108
109
110
# File 'lib/howitzer/utils/data_generator/gen.rb', line 108

def 
  @login
end

#passwordObject (readonly)

Returns the value of attribute password


108
109
110
# File 'lib/howitzer/utils/data_generator/gen.rb', line 108

def password
  @password
end

Instance Method Details

#create_mailboxObject

Deprecated.

:nocov:


122
123
124
# File 'lib/howitzer/utils/data_generator/gen.rb', line 122

def create_mailbox
  warn "[WARN] Method '#{__method__}' has not been using anymore. You have to remove usage from here #{caller.first}"
end

#delete_mailboxObject

Deprecated.

:nocov:


129
130
131
# File 'lib/howitzer/utils/data_generator/gen.rb', line 129

def delete_mailbox
  warn "[WARN] Method '#{__method__}' has not been using anymore. You have to remove usage from here #{caller.first}"
end