Class: Lutaml::Xsd::TypeSearcher::SearchResult
- Inherits:
-
Object
- Object
- Lutaml::Xsd::TypeSearcher::SearchResult
- Defined in:
- lib/lutaml/xsd/type_searcher.rb
Overview
Search result with relevance score
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#documentation ⇒ Object
readonly
Returns the value of attribute documentation.
-
#local_name ⇒ Object
readonly
Returns the value of attribute local_name.
-
#match_type ⇒ Object
readonly
Returns the value of attribute match_type.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#qualified_name ⇒ Object
readonly
Returns the value of attribute qualified_name.
-
#relevance_score ⇒ Object
readonly
Returns the value of attribute relevance_score.
-
#schema_file ⇒ Object
readonly
Returns the value of attribute schema_file.
Instance Method Summary collapse
-
#initialize(qualified_name:, local_name:, namespace:, category:, schema_file:, documentation:, relevance_score:, match_type:, definition:) ⇒ SearchResult
constructor
A new instance of SearchResult.
-
#to_h ⇒ Hash
Convert to hash for JSON/YAML output.
Constructor Details
#initialize(qualified_name:, local_name:, namespace:, category:, schema_file:, documentation:, relevance_score:, match_type:, definition:) ⇒ SearchResult
Returns a new instance of SearchResult.
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 14 def initialize(qualified_name:, local_name:, namespace:, category:, schema_file:, documentation:, relevance_score:, match_type:, definition:) @qualified_name = qualified_name @local_name = local_name @namespace = namespace @category = category @schema_file = schema_file @documentation = documentation @relevance_score = relevance_score @match_type = match_type @definition = definition end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def category @category end |
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def definition @definition end |
#documentation ⇒ Object (readonly)
Returns the value of attribute documentation.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def documentation @documentation end |
#local_name ⇒ Object (readonly)
Returns the value of attribute local_name.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def local_name @local_name end |
#match_type ⇒ Object (readonly)
Returns the value of attribute match_type.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def match_type @match_type end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def namespace @namespace end |
#qualified_name ⇒ Object (readonly)
Returns the value of attribute qualified_name.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def qualified_name @qualified_name end |
#relevance_score ⇒ Object (readonly)
Returns the value of attribute relevance_score.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def relevance_score @relevance_score end |
#schema_file ⇒ Object (readonly)
Returns the value of attribute schema_file.
10 11 12 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 10 def schema_file @schema_file end |
Instance Method Details
#to_h ⇒ Hash
Convert to hash for JSON/YAML output
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/lutaml/xsd/type_searcher.rb', line 30 def to_h { qualified_name: qualified_name, local_name: local_name, namespace: namespace, category: category, schema_file: schema_file, documentation: documentation, relevance_score: relevance_score, match_type: match_type, } end |