class SimpleXml::SubsetOperator
Attributes
type[R]
value[R]
Public Class Methods
new(type, value = nil)
click to toggle source
# File lib/model/types.rb, line 137 def initialize(type, value = nil) @type = translate_type(type) @value = value end
Public Instance Methods
to_model()
click to toggle source
# File lib/model/types.rb, line 149 def to_model vm = value ? value.to_model : nil HQMF::SubsetOperator.new(type, vm) end
translate_type(type)
click to toggle source
# File lib/model/types.rb, line 142 def translate_type(type) type = 'RECENT' if type == 'MOST RECENT' type = 'MEAN' if type == 'AVG' raise "unknown subset operator type #{type}" unless HQMF::SubsetOperator::TYPES.include? type type end