Sha256: f9185d16c235cecd49f08fc4a1eaf224ad291b2fde22e91d572cda8bb75ab443

Contents?: true

Size: 289 Bytes

Versions: 33

Compression:

Stored size: 289 Bytes

Contents

module Ddr
  class Contact < AuxiliaryResource

    def self.call(slug)
      new get(:find, slug: slug)
    rescue ActiveResource::ResourceNotFound => e
      raise Ddr::NotFoundError, e
    end

    def self.keys
      all.map(&:slug)
    end

    def to_s
      name
    end

  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
ddr-core-1.12.2 app/models/ddr/contact.rb
ddr-core-1.12.1 app/models/ddr/contact.rb
ddr-core-1.12.0 app/models/ddr/contact.rb
ddr-core-1.11.0 app/models/ddr/contact.rb
ddr-core-1.10.0 app/models/ddr/contact.rb
ddr-core-1.9.0 app/models/ddr/contact.rb
ddr-core-1.8.0 app/models/ddr/contact.rb
ddr-core-1.7.0 app/models/ddr/contact.rb
ddr-core-1.6.6 app/models/ddr/contact.rb
ddr-core-1.6.5 app/models/ddr/contact.rb
ddr-core-1.6.4 app/models/ddr/contact.rb
ddr-core-1.6.3 app/models/ddr/contact.rb
ddr-core-1.6.2 app/models/ddr/contact.rb
ddr-core-1.6.1 app/models/ddr/contact.rb
ddr-core-1.6.0 app/models/ddr/contact.rb
ddr-core-1.5.5 app/models/ddr/contact.rb
ddr-core-1.5.4 app/models/ddr/contact.rb
ddr-core-1.5.2 app/models/ddr/contact.rb
ddr-core-1.5.3 app/models/ddr/contact.rb
ddr-core-1.5.1 app/models/ddr/contact.rb