Sha256: a667ced90bf05ef403b4cee44138fafdd32a43a3e571309df3fd8df1bf7040bc
Contents?: true
Size: 648 Bytes
Versions: 10
Compression:
Stored size: 648 Bytes
Contents
require_relative "../collection.rb" require_relative "../team.rb" module PlaylyfeClient module V2 class TeamCollection < PlaylyfeClient::V2::Collection def find(str) (@items.detect {|pl| pl.name == str || pl.id == str}) end private def initialize(game) super @items=[] fill_items(@game.connection.get_team_hash_array) end def fill_items(hash_array) hash_array.each do |item_hash| @items << PlaylyfeClient::V2::Team.new(item_hash, @game) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems