tabularasa 0.2.3.1 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tabularasa.rb +5 -3
- data/tabularasa.gemspec +1 -1
- metadata +1 -1
data/lib/tabularasa.rb
CHANGED
@@ -34,15 +34,17 @@ class Tabularasa
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def collect_active_record(object)
|
37
|
-
@keys.collect{|key| object[key] || object.send(key)}
|
37
|
+
@keys.collect{|key| object[key] || object.respond_to?(key) ? object.send(key) : object.send(object.gsub(")","").split(/\(|,/))}
|
38
38
|
end
|
39
39
|
|
40
40
|
def collect_hash(object)
|
41
|
-
|
41
|
+
#@keys.collect{|key| object[key]}
|
42
|
+
@keys.collect{|key| object[key] || object.respond_to?(key) ? object.send(key) : object.send(object.gsub(")","").split(/\(|,/))}
|
42
43
|
end
|
43
44
|
|
44
45
|
def collect_array(object)
|
45
|
-
|
46
|
+
#@keys.collect{|key| object[key]}
|
47
|
+
@keys.collect{|key| object[key] || object.respond_to?(key) ? object.send(key) : object.send(object.gsub(")","").split(/\(|,/))}
|
46
48
|
end
|
47
49
|
|
48
50
|
def collect_unsupported(object)
|
data/tabularasa.gemspec
CHANGED