Class: Qti::V1::Models::BankEntryItem
- Inherits:
-
Base
show all
- Defined in:
- lib/qti/v1/models/bank_entry_item.rb
Instance Attribute Summary collapse
Attributes inherited from Models::Base
#manifest, #package_root, #path, #resource
Instance Method Summary
collapse
Methods inherited from Base
#qti_version, #return_inner_content!, #sanitize_attributes, #sanitize_attributes_by_node
#css_with_single_check, from_path!, #parse_html, #parse_xml, #preprocess_xml_doc, #raise_unsupported, #remap_href_path, #sanitize_content!, #xpath_with_single_check
Constructor Details
#initialize(item, package_root = nil) ⇒ BankEntryItem
7
8
9
10
11
|
# File 'lib/qti/v1/models/bank_entry_item.rb', line 7
def initialize(item, package_root = nil)
@doc = item
@path = item.document.url
self.package_root = package_root
end
|
Instance Attribute Details
#doc ⇒ Object
Returns the value of attribute doc.
5
6
7
|
# File 'lib/qti/v1/models/bank_entry_item.rb', line 5
def doc
@doc
end
|
Instance Method Details
#entry_type ⇒ Object
29
30
31
|
# File 'lib/qti/v1/models/bank_entry_item.rb', line 29
def entry_type
@entry_type ||= @doc.attribute('entry_type')&.value
end
|
#item_ref ⇒ Object
17
18
19
|
# File 'lib/qti/v1/models/bank_entry_item.rb', line 17
def item_ref
@item_ref ||= @doc.attribute('item_ref').value
end
|
#parent_stimulus_item_ident ⇒ Object
21
22
23
|
# File 'lib/qti/v1/models/bank_entry_item.rb', line 21
def parent_stimulus_item_ident
@parent_stimulus_item_ident ||= @doc.attribute('parent_stimulus_item_ident')&.value
end
|
#points_possible ⇒ Object
25
26
27
|
# File 'lib/qti/v1/models/bank_entry_item.rb', line 25
def points_possible
@points_possible ||= @doc.attribute('points_possible')&.value || 1
end
|
#sourcebank_ref ⇒ Object
13
14
15
|
# File 'lib/qti/v1/models/bank_entry_item.rb', line 13
def sourcebank_ref
@sourcebank_ref ||= @doc.attribute('sourcebank_ref').value
end
|