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

@@ -13,7 +13,11 @@ class DatadragonModule < SightstoneBaseModule
response = _get_api_response(uri)
_parse_response(response) { |resp|
data = JSON.parse(resp)
return data['v']
if block_given?
yield data['v']
else
return data['v']
end
}
end