Sha256: 1af6555b8ceb4c7918e129f5918b926e36c99d53fa57860f1346da316e6457ac

Contents?: true

Size: 532 Bytes

Versions: 19

Compression:

Stored size: 532 Bytes

Contents

# frozen_string_literal: true

module Meibo
  class DemographicSet < DataSet
    def check_semantically_consistent
      super

      each do |demographic|
        roster.users.find(demographic.sourced_id)
      end
    end

    def male
      @cache[:male] ||= new(select(&:male?))
    end

    def female
      @cache[:female] ||= new(select(&:female?))
    end

    def unspecified
      @cache[:unspecified] ||= new(select(&:unspecified?))
    end

    def other
      @cache[:other] ||= new(select(&:other?))
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
meibo-0.27.1 lib/meibo/demographic_set.rb
meibo-0.27.0 lib/meibo/demographic_set.rb
meibo-0.26.0 lib/meibo/demographic_set.rb
meibo-0.25.3 lib/meibo/demographic_set.rb
meibo-0.25.2 lib/meibo/demographic_set.rb
meibo-0.25.1 lib/meibo/demographic_set.rb
meibo-0.25.0 lib/meibo/demographic_set.rb
meibo-0.24.0 lib/meibo/demographic_set.rb
meibo-0.23.0 lib/meibo/demographic_set.rb
meibo-0.22.0 lib/meibo/demographic_set.rb
meibo-0.21.0 lib/meibo/demographic_set.rb
meibo-0.20.0 lib/meibo/demographic_set.rb
meibo-0.19.0 lib/meibo/demographic_set.rb
meibo-0.18.0 lib/meibo/demographic_set.rb
meibo-0.17.0 lib/meibo/demographic_set.rb
meibo-0.16.0 lib/meibo/demographic_set.rb
meibo-0.15.0 lib/meibo/demographic_set.rb
meibo-0.14.0 lib/meibo/demographic_set.rb
meibo-0.13.0 lib/meibo/demographic_set.rb