Class: Mihari::Analyzers::FreeText
- Defined in:
- lib/mihari/analyzers/free_text.rb
Constant Summary collapse
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#query ⇒ Object
readonly
Returns the value of attribute query.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #artifacts ⇒ Object
-
#initialize(query, title: nil, description: nil, tags: []) ⇒ FreeText
constructor
A new instance of FreeText.
Methods inherited from Base
inherited, #run, #run_emitter, #source
Methods included from Retriable
Methods included from Configurable
#config_keys, #configuration_status, #configured?
Constructor Details
#initialize(query, title: nil, description: nil, tags: []) ⇒ FreeText
Returns a new instance of FreeText.
19 20 21 22 23 24 25 26 27 |
# File 'lib/mihari/analyzers/free_text.rb', line 19 def initialize(query, title: nil, description: nil, tags: []) super() @query = query @title = title || "Free text cross search" @description = description || "query = #{query}" @tags = end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
11 12 13 |
# File 'lib/mihari/analyzers/free_text.rb', line 11 def description @description end |
#query ⇒ Object (readonly)
Returns the value of attribute query.
8 9 10 |
# File 'lib/mihari/analyzers/free_text.rb', line 8 def query @query end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
12 13 14 |
# File 'lib/mihari/analyzers/free_text.rb', line 12 def @tags end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
10 11 12 |
# File 'lib/mihari/analyzers/free_text.rb', line 10 def title @title end |
Instance Method Details
#artifacts ⇒ Object
29 30 31 32 33 |
# File 'lib/mihari/analyzers/free_text.rb', line 29 def artifacts Parallel.map(analyzers) do |analyzer| run_analyzer analyzer end.flatten end |