Sha256: fd499ef45b7265291a78eb84a37ad01ee46f0c3e5fff717d2ec5d72875976ad1

Contents?: true

Size: 383 Bytes

Versions: 1

Compression:

Stored size: 383 Bytes

Contents

module Pipekit
  class PersonField
    include Repository

    def get_by_id(id)
      request.get("/#{uri}").select { |element| element["id"] == id }
    end

    def get_by_key(key)
      custom_field_key = request.config["people_fields"][key] rescue nil
      key = custom_field_key || key
      request.get("/#{uri}").select { |element| element["key"] == key }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pipekit-0.2.0 lib/pipekit/person_field.rb