Module: Appsignal::CLI::Diagnose::Data Private

Included in:
Appsignal::CLI::Diagnose
Defined in:
lib/appsignal/cli/diagnose.rb

Overview

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

Since:

  • 1.1.0

Instance Method Summary collapse

Instance Method Details

#current_sectionObject

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.

Since:

  • 1.1.0



55
56
57
# File 'lib/appsignal/cli/diagnose.rb', line 55

def current_section
  @section
end

#dataObject

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.

Since:

  • 1.1.0



45
46
47
# File 'lib/appsignal/cli/diagnose.rb', line 45

def data
  @data ||= Hash.new { |hash, key| hash[key] = {} }
end

#data_section(key) ⇒ Object

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.

Since:

  • 1.1.0



49
50
51
52
53
# File 'lib/appsignal/cli/diagnose.rb', line 49

def data_section(key)
  @section = key
  yield
  @section = nil
end

#save(key, value) ⇒ Object

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.

Since:

  • 1.1.0



59
60
61
# File 'lib/appsignal/cli/diagnose.rb', line 59

def save(key, value)
  data[current_section][key] = value
end