Sha256: cc031a56d378935b4a2d6814482e3217b52507d1d1c774dfcfa312bd4265e575
Contents?: true
Size: 791 Bytes
Versions: 9
Compression:
Stored size: 791 Bytes
Contents
module RedboothRuby module Operations module Create module ClassMethods # Creates a new object # # @param [Hash] attributes The attributes of the created object def create(attributes) session = attributes.delete(:session) response = RedboothRuby.request(:post, nil, api_collection_url(attributes), attributes, options_for_request(session: session) ) new(response.data.merge(session: session)) end end def self.included(base) base.extend(ClassMethods) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems