Class: Qonfig::Commands::LoadFromSelf Private

Inherits:
Base
  • Object
show all
Defined in:
lib/qonfig/commands/load_from_self.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 0.2.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(caller_location) ⇒ LoadFromSelf

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LoadFromSelf.

Parameters:

  • caller_location (String)

Since:

  • 0.2.0



18
19
20
# File 'lib/qonfig/commands/load_from_self.rb', line 18

def initialize(caller_location)
  @caller_location = caller_location
end

Instance Attribute Details

#caller_locationString (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String)

Since:

  • 0.2.0



12
13
14
# File 'lib/qonfig/commands/load_from_self.rb', line 12

def caller_location
  @caller_location
end

Instance Method Details

#call(settings) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

Since:

  • 0.2.0



27
28
29
30
31
32
33
# File 'lib/qonfig/commands/load_from_self.rb', line 27

def call(settings)
  yaml_data = load_self_placed_yaml_data

  yaml_based_settings = build_data_set_klass(yaml_data).new.settings

  settings.__append_settings__(yaml_based_settings)
end