Method: ESP::StatService.for_stat
- Defined in:
- lib/esp/resources/stat_service.rb
.for_stat(stat_id = nil, options = {}) ⇒ ActiveResource::PaginatedCollection<ESP::StatService>
Returns a paginated collection of service stats for the given stat_id Convenience method to use instead of find since a stat_id is required to return service stats.
33 34 35 36 37 |
# File 'lib/esp/resources/stat_service.rb', line 33 def self.for_stat(stat_id = nil, = {}) # rubocop:disable Style/OptionHash fail ArgumentError, "You must supply a stat id." unless stat_id.present? from = "#{prefix}stats/#{stat_id}/services.json" find(:all, from: from, params: ) end |