Module: SmoothOperator::Persistence::ClassMethods

Defined in:
lib/smooth_operator/persistence.rb

Instance Method Summary collapse

Instance Method Details

#create(attributes = nil, relative_path = nil, data = {}, options = {}) ⇒ Object



19
20
21
# File 'lib/smooth_operator/persistence.rb', line 19

def create(attributes = nil, relative_path = nil, data = {}, options = {})
  new(attributes).tap { |object| object.save(relative_path, data, options) }
end

#methods_vs_http_verbsObject



11
12
13
# File 'lib/smooth_operator/persistence.rb', line 11

def methods_vs_http_verbs
  @methods_vs_http_verbs ||= { reload: :get, create: :post, update: :put, destroy: :delete }
end