Class: SPSS::Dictionary::MissingValue

Inherits:
Element show all
Defined in:
lib/spss.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Element

#add, #init_with, #parse_elements

Constructor Details

#initialize(data, type = nil) ⇒ MissingValue

Returns a new instance of MissingValue.



54
55
56
57
58
59
60
61
# File 'lib/spss.rb', line 54

def initialize(data,type=nil)
  @data=data
  if type.nil? or type=="lowerBound" or type=="upperBound"
      @type=type
  else
      raise Exception,"Incorrect value for type"
  end
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



53
54
55
# File 'lib/spss.rb', line 53

def data
  @data
end

#fromObject

Returns the value of attribute from.



53
54
55
# File 'lib/spss.rb', line 53

def from
  @from
end

#toObject

Returns the value of attribute to.



53
54
55
# File 'lib/spss.rb', line 53

def to
  @to
end

#typeObject

Returns the value of attribute type.



53
54
55
# File 'lib/spss.rb', line 53

def type
  @type
end

Instance Method Details

#to_xmlObject



62
63
64
# File 'lib/spss.rb', line 62

def to_xml
  "<missingValue data='#{@data}' "+(type.nil? ? "":"type='#{type}'")+"/>"
end