Sha256: 02953e97e254f4c2cb77161a50eafb5946dc75e616a91f1090d445a2ef4c5814

Contents?: true

Size: 512 Bytes

Versions: 1

Compression:

Stored size: 512 Bytes

Contents

module Mavenlink
  class ExternalReference < Model
    def save
      if valid?
        reload(create_or_update(attributes_for_create_or_update))
        true
      else
        false
      end
    end

    private

    def create_or_update(attributes)
      request.perform do
        client.post("external_references/create_or_update", { external_reference: attributes})
      end
    end

    def attributes_for_create_or_update
      specification_attributes("create_or_update_attributes")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mavenlink-0.0.1 lib/mavenlink/external_reference.rb