Class: LogStash::Filters::Empow::ClassificationRequest

Inherits:
Struct
  • Object
show all
Defined in:
lib/logstash/filters/classification-request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#productObject

Returns the value of attribute product



2
3
4
# File 'lib/logstash/filters/classification-request.rb', line 2

def product
  @product
end

#product_typeObject

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

#termObject

Returns the value of attribute term



2
3
4
# File 'lib/logstash/filters/classification-request.rb', line 2

def term
  @term
end