Class: QaServer::AuthorityScenario

Inherits:
Object
  • Object
show all
Defined in:
app/models/qa_server/authority_scenario.rb

Direct Known Subclasses

SearchScenario, TermScenario

Constant Summary collapse

DEFAULT_SUBAUTH =
nil
MIN_EXPECTED_SIZE =
200

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authority:, authority_name:, authority_scenario_config:, scenario_config: nil) ⇒ AuthorityScenario



27
28
29
30
31
32
33
34
# File 'app/models/qa_server/authority_scenario.rb', line 27

def initialize(authority:, authority_name:, authority_scenario_config:, scenario_config: nil)
  @authority = authority
  @authority_name = authority_name
  @service = authority_scenario_config['service']
  @context = authority_scenario_config.fetch('context', false)
  @subauthority_name = DEFAULT_SUBAUTH
  @min_result_size = MIN_EXPECTED_SIZE
end

Instance Attribute Details

#authorityQa::Authorities::LinkedData::GenericAuthority (readonly)



6
7
8
# File 'app/models/qa_server/authority_scenario.rb', line 6

def authority
  @authority
end

#authority_nameString (readonly)



9
10
11
# File 'app/models/qa_server/authority_scenario.rb', line 9

def authority_name
  @authority_name
end

#min_result_sizeInteger (readonly)



18
19
20
# File 'app/models/qa_server/authority_scenario.rb', line 18

def min_result_size
  @min_result_size
end

#serviceString (readonly)



12
13
14
# File 'app/models/qa_server/authority_scenario.rb', line 12

def service
  @service
end

#subauthority_nameString (readonly)



15
16
17
# File 'app/models/qa_server/authority_scenario.rb', line 15

def subauthority_name
  @subauthority_name
end

Instance Method Details

#context?Boolean



36
37
38
# File 'app/models/qa_server/authority_scenario.rb', line 36

def context?
  @context
end