Module: ActsAsTaggableOnMongoid::Taggable::TagTypeDefinition::Attributes
- Included in:
- ActsAsTaggableOnMongoid::Taggable::TagTypeDefinition
- Defined in:
- lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb
Overview
This module extracts out the basic configuration type attributes of the tag definition.
All attributes are based off of the Configuration class and in fact will default to the corresponding value in the configuration if not explicitly specified/set when the tag is defined.
Instance Attribute Summary collapse
-
#cached_in_model ⇒ Object
(also: #cached_in_model?)
readonly
Returns the value of attribute cached_in_model.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
Instance Method Summary collapse
- #force_lowercase ⇒ Object (also: #force_lowercase?)
- #force_parameterize ⇒ Object (also: #force_parameterize?)
- #parser ⇒ Object
- #preserve_tag_order ⇒ Object (also: #preserve_tag_order?)
- #remove_unused_tags ⇒ Object (also: #remove_unused_tags?)
- #taggings_table ⇒ Object
- #tags_table ⇒ Object
Instance Attribute Details
#cached_in_model ⇒ Object (readonly) Also known as: cached_in_model?
Returns the value of attribute cached_in_model.
12 13 14 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 12 def cached_in_model @cached_in_model end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
12 13 14 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 12 def default @default end |
Instance Method Details
#force_lowercase ⇒ Object Also known as: force_lowercase?
27 28 29 30 31 32 33 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 27 def force_lowercase if defined?(@force_lowercase) @force_lowercase else ActsAsTaggableOnMongoid.configuration.force_lowercase? end end |
#force_parameterize ⇒ Object Also known as: force_parameterize?
35 36 37 38 39 40 41 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 35 def force_parameterize if defined?(@force_parameterize) @force_parameterize else ActsAsTaggableOnMongoid.configuration.force_parameterize? end end |
#parser ⇒ Object
15 16 17 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 15 def parser @parser || ActsAsTaggableOnMongoid.default_parser end |
#preserve_tag_order ⇒ Object Also known as: preserve_tag_order?
43 44 45 46 47 48 49 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 43 def preserve_tag_order if defined?(@preserve_tag_order) @preserve_tag_order else ActsAsTaggableOnMongoid.configuration.preserve_tag_order? end end |
#remove_unused_tags ⇒ Object Also known as:
51 52 53 54 55 56 57 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 51 def if defined?(@remove_unused_tags) @remove_unused_tags else ActsAsTaggableOnMongoid.configuration. end end |
#taggings_table ⇒ Object
23 24 25 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 23 def taggings_table @taggings_table || ActsAsTaggableOnMongoid.taggings_table end |
#tags_table ⇒ Object
19 20 21 |
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 19 def @tags_table || ActsAsTaggableOnMongoid. end |