Sha256: 4da036150263d3eb7c1fa790f7f445d35c623a90e2d7bf1216076d57f7595065
Contents?: true
Size: 1.26 KB
Versions: 2
Compression:
Stored size: 1.26 KB
Contents
# frozen_string_literal: true module Arbetsformedlingen module Types include Dry::Types.module StrippedString = Types::Strict::String.constructor { |value| value.to_s.strip } UUIDString = Types::Strict::String.constrained(size: 36) Currency = Types::Strict::String.constructor do |string| string&.strip&.upcase end # Company Identification Number CIN = Types::Strict::String.constructor do |string| string&.delete(' ')&.delete('-') end Zip = Types::Strict::String.constructor do |string| string&.delete(' ') end Municipality = Types::Strict::String.constructor do |string| MunicipalityCode.to_code(string) end Country = Types::Strict::String.constructor do |string| CountryCode.to_code(string) end Occupation = Types::Strict::String.constructor do |string| OccupationCode.to_code(string) end PositionDuration = Types::Strict::Integer DriversLicense = Types::Strict::String.constructor do |value| DriversLicenseCode.to_code(value) end SalaryType = Types::Strict::String.constructor do |value| SalaryTypeCode.to_code(value) end ExperienceRequired = Types::Strict::String.constructor do |value| ExperienceRequiredCode.to_code(value) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
arbetsformedlingen-0.7.0 | lib/arbetsformedlingen/models/dry/types.rb |
arbetsformedlingen-0.6.0 | lib/arbetsformedlingen/models/dry/types.rb |