Class: SPSS::Dictionary::Dictionary
Instance Attribute Summary collapse
-
#date_time ⇒ Object
Returns the value of attribute date_time.
-
#locale ⇒ Object
Returns the value of attribute locale.
-
#row_count ⇒ Object
Returns the value of attribute row_count.
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ Dictionary
constructor
A new instance of Dictionary.
- #to_spss ⇒ Object
- #to_xml ⇒ Object
Methods inherited from Element
#add, #init_with, #parse_elements
Constructor Details
#initialize(config = {}) ⇒ Dictionary
Returns a new instance of Dictionary.
33 34 35 36 37 38 39 40 41 |
# File 'lib/spss.rb', line 33 def initialize(config = {}) super init_with ({ :locale=>"en_US", :date_time=>Time.new().strftime("%Y-%m-%dT%H:%M:%S"), :row_count=>1 }) init_with config end |
Instance Attribute Details
#date_time ⇒ Object
Returns the value of attribute date_time.
32 33 34 |
# File 'lib/spss.rb', line 32 def date_time @date_time end |
#locale ⇒ Object
Returns the value of attribute locale.
32 33 34 |
# File 'lib/spss.rb', line 32 def locale @locale end |
#row_count ⇒ Object
Returns the value of attribute row_count.
32 33 34 |
# File 'lib/spss.rb', line 32 def row_count @row_count end |
Instance Method Details
#to_spss ⇒ Object
47 48 49 |
# File 'lib/spss.rb', line 47 def to_spss parse_elements(:to_spss) end |
#to_xml ⇒ Object
43 44 45 46 |
# File 'lib/spss.rb', line 43 def to_xml "<dictionary locale='#{@locale}' creationDateTime='#{@date_time}' rowCount='#{@row_count}' xmlns='http://xml.spss.com/spss/data'>\n"+parse_elements(:to_xml)+"\n</dictionary>" end |