Module: TimePilot::Features::ClassMethods
- Defined in:
- lib/time_pilot/time_pilot.rb
Instance Attribute Summary collapse
-
#time_pilot_groups ⇒ Object
readonly
Returns the value of attribute time_pilot_groups.
Instance Method Summary collapse
Instance Attribute Details
#time_pilot_groups ⇒ Object (readonly)
Returns the value of attribute time_pilot_groups.
57 58 59 |
# File 'lib/time_pilot/time_pilot.rb', line 57 def time_pilot_groups @time_pilot_groups end |
Instance Method Details
#is_pilot_group(options = {}) ⇒ Object
58 59 60 61 62 |
# File 'lib/time_pilot/time_pilot.rb', line 58 def is_pilot_group( = {}) TimePilot.register_class(self) @time_pilot_groups = Array([:overridden_by]).map(&:to_s) + [to_s.underscore] end |
#pilot_feature_cardinality(feature_name) ⇒ Object
64 65 66 67 |
# File 'lib/time_pilot/time_pilot.rb', line 64 def pilot_feature_cardinality(feature_name) key_name = "#{feature_name}:#{to_s.underscore}_ids" TimePilot.redis.scard TimePilot.key(key_name) end |