Class: Dropkiq::DropMethodNameClassifier
- Inherits:
-
Object
- Object
- Dropkiq::DropMethodNameClassifier
- Defined in:
- lib/dropkiq/drop_method_name_classifier.rb
Instance Attribute Summary collapse
-
#drop_method ⇒ Object
Returns the value of attribute drop_method.
Instance Method Summary collapse
- #classify ⇒ Object
-
#initialize(drop_method) ⇒ DropMethodNameClassifier
constructor
A new instance of DropMethodNameClassifier.
Constructor Details
#initialize(drop_method) ⇒ DropMethodNameClassifier
Returns a new instance of DropMethodNameClassifier.
5 6 7 |
# File 'lib/dropkiq/drop_method_name_classifier.rb', line 5 def initialize(drop_method) self.drop_method = drop_method.to_s end |
Instance Attribute Details
#drop_method ⇒ Object
Returns the value of attribute drop_method.
3 4 5 |
# File 'lib/dropkiq/drop_method_name_classifier.rb', line 3 def drop_method @drop_method end |
Instance Method Details
#classify ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dropkiq/drop_method_name_classifier.rb', line 9 def classify if numeric_type_match? Dropkiq::NUMERIC_TYPE elsif boolean_type_match? Dropkiq::BOOLEAN_TYPE elsif text_type_match? Dropkiq::TEXT_TYPE elsif string_type_match? Dropkiq::STRING_TYPE end end |