Class: Rafflesia::CombinedSearchHitSource

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/search/combined_search_hit_source.rb

Constant Summary collapse

HASH_ATTRS =
{
  corpus: :corpus,
  detail: :detail,
  domain: :domain,
  family: :family,
  index_version: :index_version,
  manifest_generation: :manifest_generation,
  namespace: :namespace,
  position: :position,
  release_id: :release_id,
  role: :role,
  score: :score,
  score_kind: :score_kind,
  source: :source
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ CombinedSearchHitSource

Returns a new instance of CombinedSearchHitSource.



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 39

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @corpus = hash[:corpus]
  @detail = hash[:detail]
  @domain = hash[:domain]
  @family = hash[:family]
  @index_version = hash[:index_version]
  @manifest_generation = hash[:manifest_generation]
  @namespace = hash[:namespace]
  @position = hash[:position]
  @release_id = hash[:release_id]
  @role = hash[:role]
  @score = hash[:score]
  @score_kind = hash[:score_kind]
  @source = hash[:source]
end

Instance Attribute Details

#corpusObject

Returns the value of attribute corpus.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def corpus
  @corpus
end

#detailObject

Returns the value of attribute detail.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def detail
  @detail
end

#domainObject

Returns the value of attribute domain.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def domain
  @domain
end

#familyObject

Returns the value of attribute family.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def family
  @family
end

#index_versionObject

Returns the value of attribute index_version.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def index_version
  @index_version
end

#manifest_generationObject

Returns the value of attribute manifest_generation.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def manifest_generation
  @manifest_generation
end

#namespaceObject

Returns the value of attribute namespace.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def namespace
  @namespace
end

#positionObject

Returns the value of attribute position.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def position
  @position
end

#release_idObject

Returns the value of attribute release_id.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def release_id
  @release_id
end

#roleObject

Returns the value of attribute role.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def role
  @role
end

#scoreObject

Returns the value of attribute score.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def score
  @score
end

#score_kindObject

Returns the value of attribute score_kind.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def score_kind
  @score_kind
end

#sourceObject

Returns the value of attribute source.



24
25
26
# File 'lib/rafflesia/search/combined_search_hit_source.rb', line 24

def source
  @source
end