Class: InstrumentLoaderJson

Inherits:
InstrumentLoader show all
Defined in:
app/services/instrument_loader_json.rb

Overview

Loads instruments from json

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from InstrumentLoader

#load

Instance Attribute Details

#instrumentObject (readonly)

Returns the value of attribute instrument


7
8
9
# File 'app/services/instrument_loader_json.rb', line 7

def instrument
  @instrument
end

#response_scaleObject (readonly)

Returns the value of attribute response_scale


8
9
10
# File 'app/services/instrument_loader_json.rb', line 8

def response_scale
  @response_scale
end

Instance Method Details

#load_instrument(instrument:) ⇒ Object

Loads attributes, an array of Items, and rating scale that represent the questions in an instrument.


11
12
13
14
15
16
17
# File 'app/services/instrument_loader_json.rb', line 11

def load_instrument(instrument:)
  @instrument = instrument
  load_content
  load_attributes
  load_elements
  instrument
end