Sha256: 67df7bbce1e5bb58d3bd790c350c0b73452e152d996839677cc51399b45a9275

Contents?: true

Size: 391 Bytes

Versions: 1

Compression:

Stored size: 391 Bytes

Contents

module Nusii
  module Crud
    module Save

      def save
        self.id.present? ? update_call : create_call
      end

    private

      def create_call
        requester = Nusii::Request.new
        requester.create_call self.class, self
      end

      def update_call
        requester = Nusii::Request.new
        requester.update_call self.class, self
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nusii-0.1.1 lib/nusii/crud/save.rb