Class: HQMF::SubsetOperator
- Inherits:
-
Object
- Object
- HQMF::SubsetOperator
- Includes:
- Conversion::Utilities
- Defined in:
- lib/hqmf-model/types.rb
Constant Summary collapse
- TYPES =
['COUNT', 'FIRST', 'SECOND', 'THIRD', 'FOURTH', 'FIFTH', 'RECENT', 'LAST', 'MIN', 'MAX', 'DATEDIFF', 'TIMEDIFF', 'MEDIAN', 'MEAN']
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
-
#value ⇒ Object
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type, value) ⇒ SubsetOperator
constructor
A new instance of SubsetOperator.
- #to_json ⇒ Object
Methods included from Conversion::Utilities
#build_hash, #check_equality, #json_array, #openstruct_to_json
Constructor Details
#initialize(type, value) ⇒ SubsetOperator
Returns a new instance of SubsetOperator.
265 266 267 268 269 270 271 272 273 |
# File 'lib/hqmf-model/types.rb', line 265 def initialize(type,value) @type = type if (value.is_a? HQMF::Value) value.inclusive = true @value = HQMF::Range.new('IVL_PQ',value,value,nil) else @value = value end end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
262 263 264 |
# File 'lib/hqmf-model/types.rb', line 262 def type @type end |
#value ⇒ Object
Returns the value of attribute value.
262 263 264 |
# File 'lib/hqmf-model/types.rb', line 262 def value @value end |
Class Method Details
Instance Method Details
#==(other) ⇒ Object
290 291 292 |
# File 'lib/hqmf-model/types.rb', line 290 def ==(other) check_equality(self,other) end |
#to_json ⇒ Object
283 284 285 286 287 288 |
# File 'lib/hqmf-model/types.rb', line 283 def to_json x = nil json = build_hash(self, [:type]) json[:value] = @value.to_json if @value json end |