Method: ESP::StatCustomSignature.find

Defined in:
lib/esp/resources/stat_custom_signature.rb

.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