Class: NoFlyList::TaggableRecord::TagSetup
- Inherits:
-
Object
- Object
- NoFlyList::TaggableRecord::TagSetup
- Defined in:
- lib/no_fly_list/taggable_record/tag_setup.rb
Instance Attribute Summary collapse
-
#adapter ⇒ Object
readonly
Returns the value of attribute adapter.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#limit ⇒ Object
readonly
Returns the value of attribute limit.
-
#polymorphic ⇒ Object
readonly
Returns the value of attribute polymorphic.
-
#restrict_to_existing ⇒ Object
readonly
Returns the value of attribute restrict_to_existing.
-
#tag_class_name ⇒ Object
readonly
Returns the value of attribute tag_class_name.
-
#taggable_klass ⇒ Object
readonly
Returns the value of attribute taggable_klass.
-
#tagging_class_name ⇒ Object
readonly
Returns the value of attribute tagging_class_name.
-
#transformer ⇒ Object
readonly
Returns the value of attribute transformer.
Instance Method Summary collapse
-
#initialize(taggable_klass, context, options = {}) ⇒ TagSetup
constructor
A new instance of TagSetup.
Constructor Details
#initialize(taggable_klass, context, options = {}) ⇒ TagSetup
Returns a new instance of TagSetup.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 10 def initialize(taggable_klass, context, = {}) @taggable_klass = taggable_klass @context = context @transformer = .fetch(:transformer, ApplicationTagTransformer) @polymorphic = .fetch(:polymorphic, false) @restrict_to_existing = .fetch(:restrict_to_existing, false) @limit = .fetch(:limit, nil) @tag_class_name = determine_tag_class_name(taggable_klass, ) @tagging_class_name = determine_tagging_class_name(taggable_klass, ) @adapter = determine_adapter end |
Instance Attribute Details
#adapter ⇒ Object (readonly)
Returns the value of attribute adapter.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def adapter @adapter end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def context @context end |
#limit ⇒ Object (readonly)
Returns the value of attribute limit.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def limit @limit end |
#polymorphic ⇒ Object (readonly)
Returns the value of attribute polymorphic.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def polymorphic @polymorphic end |
#restrict_to_existing ⇒ Object (readonly)
Returns the value of attribute restrict_to_existing.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def restrict_to_existing @restrict_to_existing end |
#tag_class_name ⇒ Object (readonly)
Returns the value of attribute tag_class_name.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def tag_class_name @tag_class_name end |
#taggable_klass ⇒ Object (readonly)
Returns the value of attribute taggable_klass.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def taggable_klass @taggable_klass end |
#tagging_class_name ⇒ Object (readonly)
Returns the value of attribute tagging_class_name.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def tagging_class_name @tagging_class_name end |
#transformer ⇒ Object (readonly)
Returns the value of attribute transformer.
6 7 8 |
# File 'lib/no_fly_list/taggable_record/tag_setup.rb', line 6 def transformer @transformer end |