Module: RedisTags::ClassMethods
- Defined in:
- lib/redis_tags.rb
Instance Method Summary collapse
- #acts_as_taggable_on_steroids_legacy_mode? ⇒ Boolean
- #has_tags(options = {}) ⇒ Object
- #redis_tags_engine ⇒ Object
- #redis_tags_engine=(redis_instance) ⇒ Object
- #tags_starting_with(partial_tag_name) ⇒ Object
- #uses_redis_tags(options = {}) ⇒ Object
Instance Method Details
#acts_as_taggable_on_steroids_legacy_mode? ⇒ Boolean
32 33 34 |
# File 'lib/redis_tags.rb', line 32 def acts_as_taggable_on_steroids_legacy_mode? @@acts_as_taggable_on_steroids_legacy == true end |
#has_tags(options = {}) ⇒ Object
40 41 42 |
# File 'lib/redis_tags.rb', line 40 def ( = {}) RedisTags::RedisTag.(self, ) end |
#redis_tags_engine ⇒ Object
36 37 38 |
# File 'lib/redis_tags.rb', line 36 def @@redis_tags_engine end |
#redis_tags_engine=(redis_instance) ⇒ Object
28 29 30 |
# File 'lib/redis_tags.rb', line 28 def (redis_instance) @@redis_tags_engine = redis_instance end |
#tags_starting_with(partial_tag_name) ⇒ Object
44 45 46 |
# File 'lib/redis_tags.rb', line 44 def (partial_tag_name) RedisTags::RedisTag.starts_with?(self., partial_tag_name) end |
#uses_redis_tags(options = {}) ⇒ Object
22 23 24 25 26 |
# File 'lib/redis_tags.rb', line 22 def ( = {}) = {:engine => Redis.new, :acts_as_taggable_on_steroids_legacy_mode => false}.merge!() @@redis_tags_engine = [:engine] @@acts_as_taggable_on_steroids_legacy = [:acts_as_taggable_on_steroids_legacy_mode] end |