class ESP::StatCustomSignature
Public Class Methods
find(*arguments)
click to toggle source
Find a StatRegion
by id
call-seq -> +super.find(id, options = {})+
@overload find(id)
@param id [Integer, Numeric, #to_i] Required ID of the custom_signature stat to retrieve.
@overload find(id, options)
@param id [Integer, Numeric, #to_i] Required ID of the custom_signature stat to retrieve. @param 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}[http://api-docs.evident.io?ruby#stat-custom-signature-attributes] for valid arguments
@overload find(scope, options)
*call-seq* -> +super.all(options)+ @api private @param scope [Object] *Example:* +:all+ @param options [Hash] +params: { stat_id: Integer }+ @raise [ArgumentError] if no +stat_id+ is supplied.
@return [ESP::StatCustomSignature]
Calls superclass method
ESP::Resource::find
# 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 = {})
click to toggle source
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.
@param stat_id [Integer, Numeric] Required ID of the stat to list custom_signature stats for. @param 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}[http://api-docs.evident.io?ruby#stat-custom-signature-attributes] for valid arguments
@return [ESP::StatCustomSignature] @raise [ArgumentError] if no stat_id
is supplied. @example
stats = ESP::StatCustomSignature.for_stat(1194)
# 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
where(*)
click to toggle source
Not Implemented. You cannot search for a StatSignature
.
@return [void]
# File lib/esp/resources/stat_custom_signature.rb, line 13 def self.where(*) fail ESP::NotImplementedError end