Class: PlaylyfeClient::V2::MetricCollection

Inherits:
Collection
  • Object
show all
Defined in:
lib/playlyfe_client/v2/collection/metric_collection.rb

Instance Attribute Summary

Attributes inherited from Collection

#game

Instance Method Summary collapse

Methods inherited from Collection

#add, #all, #each, #find_all, #first, #last, #size, #to_a

Instance Method Details

#find(str) ⇒ Object



8
9
10
# File 'lib/playlyfe_client/v2/collection/metric_collection.rb', line 8

def find(str)
  (@items.detect {|pl| pl.name == str || pl.id == str})
end