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

Instance Method Summary collapse

Instance Attribute Details

#cached_in_modelObject (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

#defaultObject (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_lowercaseObject 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_parameterizeObject 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

#parserObject



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_orderObject 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_tagsObject Also known as: remove_unused_tags?



51
52
53
54
55
56
57
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 51

def remove_unused_tags
  if defined?(@remove_unused_tags)
    @remove_unused_tags
  else
    ActsAsTaggableOnMongoid.configuration.remove_unused_tags?
  end
end

#taggings_tableObject



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_tableObject



19
20
21
# File 'lib/acts_as_taggable_on_mongoid/taggable/tag_type_definition/attributes.rb', line 19

def tags_table
  @tags_table || ActsAsTaggableOnMongoid.tags_table
end