Method: SPSS::Dictionary::Variable#initialize

Defined in:
lib/spss.rb

#initialize(config = {}) ⇒ Variable

Returns a new instance of Variable.

[View source] [View on GitHub]

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/spss.rb', line 80

def initialize(config={})
  super
  @@var_number||=1
  init_with({
    :aligment           =>  "left",
    :display_width      =>  8,
    :label              =>  "Variable #{@@var_number}",
    :measurement_level  =>  "SCALE",
    :name               =>  "var#{@@var_number}",
    :type               =>  0,
    :decimals           =>  2,
    :width              =>  10,
    :type_format        =>  "F",
    :labelset           => nil
  })
  init_with config
  @missing_values=[]
  @@var_number+=1
end