calls now accept codeblocks - lets call this version 1.0.0

This commit is contained in:
danijoo
2014-01-01 19:59:06 +01:00
parent 466d0e8f66
commit dc6d037768
8 changed files with 62 additions and 12 deletions

View File

@@ -25,7 +25,12 @@ class GameModule < SightstoneBaseModule
response = _get_api_response(uri)
_parse_response(response) { |resp|
data = JSON.parse(resp)
return MatchHistory.new(data)
history = MatchHistory.new(data)
if block_given?
yield history
else
return history
end
}
end