Sha256: 13fac12afad61ff7202e5cced31529ba455c16a173d7a4c7682ed21771937adb

Contents?: true

Size: 991 Bytes

Versions: 4

Compression:

Stored size: 991 Bytes

Contents

module Arbetsformedlingen
  module API
    module Values
      MatchningPage = KeyStruct.new(
        :list_name,
        :total_ads,
        :total_ads_exact,
        :total_ads_nearby,
        :total_vacancies_on_page,
        :total_places_total,
        :total_pages,
        :data,
        :raw_data
      )
      class MatchningPage
        include Enumerable

        def each(&block)
          data.each(&block)
        end

        def to_h
          hash = super.to_h
          hash[:data].map!(&:to_h)
          hash
        end
      end

      MatchningAd = KeyStruct.new(
        :id,
        :title,
        :occupation,
        :occupation_id,
        :company,
        :municipalities,
        :municipality_id,
        :published_at,
        :last_application_at,
        :url,
        :relevance,
        :total_vacancies,
        :total_vacancies_with_visa,
        :duration_id,
        :counties,
        :country_id,
        :employment_type
      )
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
arbetsformedlingen-0.5.0 lib/arbetsformedlingen/api/values/matchning_result_values.rb
arbetsformedlingen-0.4.1 lib/arbetsformedlingen/api/values/matchning_result_values.rb
arbetsformedlingen-0.4.0 lib/arbetsformedlingen/api/values/matchning_result_values.rb
arbetsformedlingen-0.3.0 lib/arbetsformedlingen/api/values/matchning_result_values.rb