Module: ChessApi
- Defined in:
- lib/chess_api.rb,
lib/chess_api/error.rb,
lib/chess_api/client.rb,
lib/chess_api/object.rb,
lib/chess_api/version.rb,
lib/chess_api/resource.rb,
lib/chess_api/collection.rb,
lib/chess_api/objects/club.rb,
lib/chess_api/objects/player.rb,
lib/chess_api/resources/players.rb,
lib/chess_api/objects/titled_player.rb,
lib/chess_api/resources/titled_players.rb
Defined Under Namespace
Classes: Client, Club, Collection, Error, Object, Player, PlayerResource, Resource, TitledPlayer, TitledPlayerResource
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.build_object(data, klass) ⇒ Object
21 22 23 24 |
# File 'lib/chess_api.rb', line 21 def self.build_object(data, klass) return data unless data.is_a?(Hash) klass.new(data) end |