Class: Appydave::Tools::Configuration::Models::BrandsConfig::UserInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/appydave/tools/configuration/models/brands_config.rb

Overview

Type-safe class to access user properties

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, data) ⇒ UserInfo

Returns a new instance of UserInfo.



256
257
258
259
260
261
262
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 256

def initialize(key, data)
  @key = key
  @name = data['name']
  @email = data['email']
  @role = data['role'] || 'team_member'
  @default_aws_profile = data['default_aws_profile']
end

Instance Attribute Details

#default_aws_profileObject

Returns the value of attribute default_aws_profile.



254
255
256
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 254

def default_aws_profile
  @default_aws_profile
end

#emailObject

Returns the value of attribute email.



254
255
256
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 254

def email
  @email
end

#keyObject

Returns the value of attribute key.



254
255
256
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 254

def key
  @key
end

#nameObject

Returns the value of attribute name.



254
255
256
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 254

def name
  @name
end

#roleObject

Returns the value of attribute role.



254
255
256
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 254

def role
  @role
end

Instance Method Details

#to_hObject



264
265
266
267
268
269
270
271
# File 'lib/appydave/tools/configuration/models/brands_config.rb', line 264

def to_h
  {
    'name' => @name,
    'email' => @email,
    'role' => @role,
    'default_aws_profile' => @default_aws_profile
  }
end