Class: HQMF2::SubsetOperator
- Inherits:
-
Object
- Object
- HQMF2::SubsetOperator
- Includes:
- Utilities
- Defined in:
- lib/hqmf-parser/2.0/types.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(entry) ⇒ SubsetOperator
constructor
A new instance of SubsetOperator.
- #to_model ⇒ Object
Methods included from Utilities
Methods included from HQMF::Conversion::Utilities
#build_hash, #check_equality, #json_array, #openstruct_to_json
Constructor Details
#initialize(entry) ⇒ SubsetOperator
Returns a new instance of SubsetOperator.
170 171 172 173 174 175 176 177 |
# File 'lib/hqmf-parser/2.0/types.rb', line 170 def initialize(entry) @entry = entry @type = attr_val('./cda:subsetCode/@code') value_def = @entry.at_xpath('./*/cda:repeatNumber', HQMF2::Document::NAMESPACES) if value_def @value = HQMF2::Range.new(value_def, 'IVL_INT') end end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
168 169 170 |
# File 'lib/hqmf-parser/2.0/types.rb', line 168 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
168 169 170 |
# File 'lib/hqmf-parser/2.0/types.rb', line 168 def value @value end |
Instance Method Details
#to_model ⇒ Object
179 180 181 182 |
# File 'lib/hqmf-parser/2.0/types.rb', line 179 def to_model vm = value ? value.to_model : nil HQMF::SubsetOperator.new(type, vm) end |