Class: Meibo::DemographicSet

Inherits:
DataSet
  • Object
show all
Defined in:
lib/meibo/demographic_set.rb

Instance Attribute Summary

Attributes inherited from DataSet

#roster

Instance Method Summary collapse

Methods inherited from DataSet

#<<, #each, #empty?, #find, #initialize, #lineno, #where

Constructor Details

This class inherits a constructor from Meibo::DataSet

Instance Method Details

#check_semantically_consistentObject



5
6
7
8
9
10
11
# File 'lib/meibo/demographic_set.rb', line 5

def check_semantically_consistent
  super

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

#femaleObject



17
18
19
# File 'lib/meibo/demographic_set.rb', line 17

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

#maleObject



13
14
15
# File 'lib/meibo/demographic_set.rb', line 13

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

#otherObject



25
26
27
# File 'lib/meibo/demographic_set.rb', line 25

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

#unspecifiedObject



21
22
23
# File 'lib/meibo/demographic_set.rb', line 21

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