Class: ESP::StatCustomSignature

Inherits:
Resource show all
Defined in:
lib/esp/resources/stat_custom_signature.rb

'total' rollup methods collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Dirty

#changed_attributes, #original_attributes, #original_attributes=

Methods included from LoadWithOriginalAttributes

#load

Class Method Details

.createvoid

This method returns an undefined value.

Not Implemented. You cannot create a Stat.



# File 'lib/esp/resources/stat_custom_signature.rb', line 71

.find(id) ⇒ ESP::StatCustomSignature .find(id, options) ⇒ ESP::StatCustomSignature .find(scope, options) ⇒ ESP::StatCustomSignature

Find a StatRegion by id

call-seq -> super.find(id, options = {})

Overloads:

  • .find(id) ⇒ ESP::StatCustomSignature

    Parameters:

    • id (Integer, Numeric, #to_i)

      Required ID of the custom_signature stat to retrieve.

  • .find(id, options) ⇒ ESP::StatCustomSignature

    Parameters:

    • id (Integer, Numeric, #to_i)

      Required ID of the custom_signature stat to retrieve.

    • options (Hash)

      Optional hash of options.

      Valid Options

      include | The list of associated objects to return on the initial request.

      valid Includable Associations

      See API documentation for valid arguments

  • .find(scope, options) ⇒ ESP::StatCustomSignature

    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.

    call-seq -> super.all(options)

    Parameters:

    • scope (Object)

      Example: :all

    • options (Hash)

      params: { stat_id: Integer }

    Raises:

    • (ArgumentError)

      if no stat_id is supplied.

Returns:



62
63
64
65
66
67
68
69
# File 'lib/esp/resources/stat_custom_signature.rb', line 62

def self.find(*arguments)
  scope = arguments.slice!(0)
  options = (arguments.slice!(0) || {}).with_indifferent_access
  return super(scope, options) if scope.is_a?(Numeric) || options[:from].present?
  params = options.fetch(:params, {}).with_indifferent_access
  stat_id = params.delete(:stat_id)
  for_stat(stat_id)
end

.for_stat(stat_id = nil, options = {}) ⇒ ESP::StatCustomSignature

Returns a paginated collection of custom_signature stats for the given stat_id Convenience method to use instead of find since a stat_id is required to return custom_signature stats.

Examples:

stats = ESP::StatCustomSignature.for_stat(1194)

Parameters:

  • stat_id (Integer, Numeric) (defaults to: nil)

    Required ID of the stat to list custom_signature stats for.

  • options (Hash) (defaults to: {})

    Optional hash of options.

    Valid Options

    include | The list of associated objects to return on the initial request.

    valid Includable Associations

    See API documentation for valid arguments

Returns:

Raises:

  • (ArgumentError)

    if no stat_id is supplied.



33
34
35
36
37
# File 'lib/esp/resources/stat_custom_signature.rb', line 33

def self.for_stat(stat_id = nil, options = {}) # rubocop:disable Style/OptionHash
  fail ArgumentError, "You must supply a stat id." unless stat_id.present?
  from = "#{prefix}stats/#{stat_id}/custom_signatures.json"
  find(:all, from: from, params: options)
end

.wherevoid

This method returns an undefined value.

Not Implemented. You cannot search for a StatSignature.



13
14
15
# File 'lib/esp/resources/stat_custom_signature.rb', line 13

def self.where(*)
  fail ESP::NotImplementedError
end

Instance Method Details

#custom_signatureESP::CustomSignature

The custom_signature these stats are for.



8
# File 'lib/esp/resources/stat_custom_signature.rb', line 8

belongs_to :custom_signature, class_name: 'ESP::CustomSignature'

#destroyvoid

This method returns an undefined value.

Not Implemented. You cannot delete a Stat.



# File 'lib/esp/resources/stat_custom_signature.rb', line 79

#savevoid

This method returns an undefined value.

Not Implemented. You cannot create or update a Stat.



# File 'lib/esp/resources/stat_custom_signature.rb', line 75

#totalObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 85

#total_errorObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 93

#total_failObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 89

#total_infoObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 95

#total_new_1dObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 149

#total_new_1d_errorObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 113

#total_new_1d_failObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 109

#total_new_1d_infoObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 115

#total_new_1d_passObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 107

#total_new_1d_warnObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 111

#total_new_1hObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 147

#total_new_1h_errorObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 103

#total_new_1h_failObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 99

#total_new_1h_infoObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 105

#total_new_1h_passObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 97

#total_new_1h_warnObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 101

#total_new_1wObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 151

#total_new_1w_errorObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 121

#total_new_1w_failObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 119

#total_new_1w_infoObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 123

#total_new_1w_passObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 117

#total_new_1w_warnObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 125

#total_oldObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 153

#total_old_errorObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 133

#total_old_failObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 127

#total_old_infoObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 135

#total_old_passObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 129

#total_old_warnObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 131

#total_passObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 87

#total_suppressedObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 137

#total_suppressed_errorObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 145

#total_suppressed_failObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 141

#total_suppressed_passObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 139

#total_suppressed_warnObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 143

#total_warnObject



# File 'lib/esp/resources/stat_custom_signature.rb', line 91