Class: LogStash::Filters::Empow::ClassificationRequest
- Inherits:
-
Struct
- Object
- Struct
- LogStash::Filters::Empow::ClassificationRequest
- Defined in:
- lib/logstash/filters/classification-request.rb
Instance Attribute Summary collapse
-
#product ⇒ Object
Returns the value of attribute product.
-
#product_type ⇒ Object
Returns the value of attribute product_type.
-
#term ⇒ Object
Returns the value of attribute term.
Instance Method Summary collapse
-
#initialize(product_type, product, term) ⇒ ClassificationRequest
constructor
A new instance of ClassificationRequest.
Constructor Details
#initialize(product_type, product, term) ⇒ ClassificationRequest
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/logstash/filters/classification-request.rb', line 3 def initialize(product_type, product, term) if product_type.nil? raise ArgumentError, 'product type cannot be empty' end product_type = product_type.upcase.strip unless product.nil? product = product.downcase.strip end super(product_type, product, term) end |
Instance Attribute Details
#product ⇒ Object
Returns the value of attribute product
2 3 4 |
# File 'lib/logstash/filters/classification-request.rb', line 2 def product @product end |
#product_type ⇒ Object
Returns the value of attribute product_type
2 3 4 |
# File 'lib/logstash/filters/classification-request.rb', line 2 def product_type @product_type end |
#term ⇒ Object
Returns the value of attribute term
2 3 4 |
# File 'lib/logstash/filters/classification-request.rb', line 2 def term @term end |