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.



467
468
469
470
471
472
# File 'lib/config_o_mat/shared/types.rb', line 467

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.



463
464
465
# File 'lib/config_o_mat/shared/types.rb', line 463

def loaded_profile_data
  @loaded_profile_data
end

#secretsObject (readonly)

Returns the value of attribute secrets.



463
464
465
# File 'lib/config_o_mat/shared/types.rb', line 463

def secrets
  @secrets
end

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


485
486
487
488
489
# File 'lib/config_o_mat/shared/types.rb', line 485

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

#hashObject



477
478
479
# File 'lib/config_o_mat/shared/types.rb', line 477

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

#to_hObject



481
482
483
# File 'lib/config_o_mat/shared/types.rb', line 481

def to_h
  contents
end

#validateObject



474
475
# File 'lib/config_o_mat/shared/types.rb', line 474

def validate
end