midas-inactive_record 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{inactive_record}
5
- s.version = "1.0.1"
5
+ s.version = "1.0.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["C. Jason Harrelson"]
9
- s.date = %q{2009-06-24}
9
+ s.date = %q{2009-09-13}
10
10
  s.description = %q{InactiveRecord gives you many of the features you know and love from ActiveRecord without the need for a backing database table.}
11
11
  s.email = ["cjharrelson@gmail.com"]
12
12
  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "PostInstall.txt", "README.rdoc"]
@@ -4,5 +4,5 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'inactive_record/base'
5
5
 
6
6
  module InactiveRecord
7
- VERSION = '1.0.1'
7
+ VERSION = '1.0.2'
8
8
  end
@@ -81,12 +81,17 @@ module InactiveRecord
81
81
  self.instance_variables.each do |var|
82
82
  var_name = var.to_s.gsub( /@/, '' )
83
83
  var_name = var_name.dasherize if dasherize
84
+ attr_val = self.instance_variable_get( var )
84
85
  if only
85
- xml.tag!( var_name, self.instance_variable_get( var ) ) if only.include?( var_name ) || only.include?( var_name.to_sym )
86
+ xml.tag!( var_name, attr_val ) if only.include?( var_name ) || only.include?( var_name.to_sym )
86
87
  elsif except
87
- xml.tag!( var_name, self.instance_variable_get( var ) ) unless except.include?( var_name ) || except.include?( var_name.to_sym )
88
+ xml.tag!( var_name, attr_val ) unless except.include?( var_name ) || except.include?( var_name.to_sym )
88
89
  else
89
- xml.tag!( var_name, self.instance_variable_get( var ) )
90
+ if attr_val.is_a?( Array )
91
+ xml << attr_val.to_xml( :skip_instruct => true )
92
+ else
93
+ xml.tag!( var_name, attr_val )
94
+ end
90
95
  end
91
96
  end
92
97
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midas-inactive_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - C. Jason Harrelson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-24 00:00:00 -07:00
12
+ date: 2009-09-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency