Sha256: 6adb3c41b8283c7346fc456f8df625d90197ee81b7ff4f1106fa010738207167
Contents?: true
Size: 855 Bytes
Versions: 75
Compression:
Stored size: 855 Bytes
Contents
module HQMF1 class Comparison include HQMF1::Utilities attr_reader :restrictions, :data_criteria_id, :title, :subset def initialize(data_criteria_id, entry, parent, doc) @doc = doc @data_criteria_id = data_criteria_id @entry = entry title_def = @entry.at_xpath('./*/cda:title') if title_def @title = title_def.inner_text end @restrictions = [] restriction_def = @entry.at_xpath('./*/cda:sourceOf') if restriction_def @entry.xpath('./*/cda:sourceOf').each do |restriction| @restrictions << Restriction.new(restriction, self, @doc) end end end def to_json json = build_hash(self, [:data_criteria_id,:title,:subset]) json[:restrictions] = json_array(@restrictions) json end end end
Version data entries
75 entries across 75 versions & 3 rubygems