lib/gooddata/rest/object_factory.rb in gooddata-0.6.24 vs lib/gooddata/rest/object_factory.rb in gooddata-0.6.25

- old
+ new

@@ -57,10 +57,15 @@ end def create(type, data = {}, opts = {}) res = type.new(data) res.client = client - res.project = opts[:project] + + opts.each do |key, value| + method = "#{key}=" + res.send(method, value) if res.respond_to?(method) + end + res end def find(type, opts = {}) type.send('find', opts, @client)