Class: ConfigOMat::LoadedProfile

Inherits:
ConfigItem show all
Extended by:
Forwardable
Defined in:
lib/config_o_mat/shared/types.rb

Instance Attribute Summary collapse

Attributes inherited from ConfigItem

#errors

Instance Method Summary collapse

Methods inherited from ConfigItem

#==, #error, #errors?, #validate!

Constructor Details

#initialize(loaded_profile_data, secrets) ⇒ LoadedProfile

Returns a new instance of LoadedProfile.



496
497
498
499
500
501
# File 'lib/config_o_mat/shared/types.rb', line 496

def initialize(loaded_profile_data, secrets)
  @loaded_profile_data = loaded_profile_data
  @secrets = secrets || {}

  @errors = @loaded_profile_data.errors if @loaded_profile_data.errors?
end

Instance Attribute Details

#loaded_profile_dataObject (readonly)

Returns the value of attribute loaded_profile_data.



492
493
494
# File 'lib/config_o_mat/shared/types.rb', line 492

def loaded_profile_data
  @loaded_profile_data
end

#secretsObject (readonly)

Returns the value of attribute secrets.



492
493
494
# File 'lib/config_o_mat/shared/types.rb', line 492

def secrets
  @secrets
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


514
515
516
517
518
# File 'lib/config_o_mat/shared/types.rb', line 514

def eql?(other)
  return false if !super(other)
  return false if other.loaded_profile_data != @loaded_profile_data || other.secrets != @secrets
  true
end

#hashObject



506
507
508
# File 'lib/config_o_mat/shared/types.rb', line 506

def hash
  @loaded_profile_data.hash ^ @secrets.hash
end

#to_hObject



510
511
512
# File 'lib/config_o_mat/shared/types.rb', line 510

def to_h
  contents
end

#validateObject



503
504
# File 'lib/config_o_mat/shared/types.rb', line 503

def validate
end