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.
59 60 61 |
# File 'lib/time_pilot/time_pilot.rb', line 59 def time_pilot_groups @time_pilot_groups end |
Instance Method Details
#is_pilot_group(options = {}) ⇒ Object
60 61 62 63 64 |
# File 'lib/time_pilot/time_pilot.rb', line 60 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
66 67 68 69 |
# File 'lib/time_pilot/time_pilot.rb', line 66 def pilot_feature_cardinality(feature_name) key_name = "#{feature_name}:#{to_s.underscore}_ids" TimePilot.redis.scard TimePilot.key(key_name) end |