Class: ESP::StatSignature

Inherits:
Resource show all
Defined in:
lib/esp/resources/stat_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_signature.rb', line 71

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

Find a StatRegion by id

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

Overloads:

  • .find(id) ⇒ ESP::StatSignature

    Parameters:

    • id (Integer, Numeric, #to_i)

      Required ID of the signature stat to retrieve.

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

    Parameters:

    • id (Integer, Numeric, #to_i)

      Required ID of the signature stat to retrieve.

    • options

      | 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::StatSignature

    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_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 = {}) ⇒ ActiveResource::PaginatedCollection<ESP::StatSignature>

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

Examples:

stats = ESP::StatSignature.for_stat(1194)

Parameters:

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

    Required ID of the stat to list 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_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}/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_signature.rb', line 13

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

Instance Method Details

#destroyvoid

This method returns an undefined value.

Not Implemented. You cannot delete a Stat.



# File 'lib/esp/resources/stat_signature.rb', line 81

#savevoid

This method returns an undefined value.

Not Implemented. You cannot create or update a Stat.



# File 'lib/esp/resources/stat_signature.rb', line 76

#signatureESP::Signature

The signature these stats are for.

Returns:



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

belongs_to :signature, class_name: 'ESP::Signature'

#totalObject



# File 'lib/esp/resources/stat_signature.rb', line 88

#total_errorObject



# File 'lib/esp/resources/stat_signature.rb', line 96

#total_failObject



# File 'lib/esp/resources/stat_signature.rb', line 92

#total_infoObject



# File 'lib/esp/resources/stat_signature.rb', line 98

#total_new_1dObject



# File 'lib/esp/resources/stat_signature.rb', line 152

#total_new_1d_errorObject



# File 'lib/esp/resources/stat_signature.rb', line 116

#total_new_1d_failObject



# File 'lib/esp/resources/stat_signature.rb', line 112

#total_new_1d_infoObject



# File 'lib/esp/resources/stat_signature.rb', line 118

#total_new_1d_passObject



# File 'lib/esp/resources/stat_signature.rb', line 110

#total_new_1d_warnObject



# File 'lib/esp/resources/stat_signature.rb', line 114

#total_new_1hObject



# File 'lib/esp/resources/stat_signature.rb', line 150

#total_new_1h_errorObject



# File 'lib/esp/resources/stat_signature.rb', line 106

#total_new_1h_failObject



# File 'lib/esp/resources/stat_signature.rb', line 102

#total_new_1h_infoObject



# File 'lib/esp/resources/stat_signature.rb', line 108

#total_new_1h_passObject



# File 'lib/esp/resources/stat_signature.rb', line 100

#total_new_1h_warnObject



# File 'lib/esp/resources/stat_signature.rb', line 104

#total_new_1wObject



# File 'lib/esp/resources/stat_signature.rb', line 154

#total_new_1w_errorObject



# File 'lib/esp/resources/stat_signature.rb', line 124

#total_new_1w_failObject



# File 'lib/esp/resources/stat_signature.rb', line 122

#total_new_1w_infoObject



# File 'lib/esp/resources/stat_signature.rb', line 126

#total_new_1w_passObject



# File 'lib/esp/resources/stat_signature.rb', line 120

#total_new_1w_warnObject



# File 'lib/esp/resources/stat_signature.rb', line 128

#total_oldObject



# File 'lib/esp/resources/stat_signature.rb', line 156

#total_old_errorObject



# File 'lib/esp/resources/stat_signature.rb', line 136

#total_old_failObject



# File 'lib/esp/resources/stat_signature.rb', line 130

#total_old_infoObject



# File 'lib/esp/resources/stat_signature.rb', line 138

#total_old_passObject



# File 'lib/esp/resources/stat_signature.rb', line 132

#total_old_warnObject



# File 'lib/esp/resources/stat_signature.rb', line 134

#total_passObject



# File 'lib/esp/resources/stat_signature.rb', line 90

#total_suppressedObject



# File 'lib/esp/resources/stat_signature.rb', line 140

#total_suppressed_errorObject



# File 'lib/esp/resources/stat_signature.rb', line 148

#total_suppressed_failObject



# File 'lib/esp/resources/stat_signature.rb', line 144

#total_suppressed_passObject



# File 'lib/esp/resources/stat_signature.rb', line 142

#total_suppressed_warnObject



# File 'lib/esp/resources/stat_signature.rb', line 146

#total_warnObject



# File 'lib/esp/resources/stat_signature.rb', line 94