a_la_chart 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/lib/a_la_chart/a_la_chart.rb +11 -7
- data/lib/a_la_chart.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -3,11 +3,11 @@ module ALaChart
|
|
3
3
|
module HelperMethods
|
4
4
|
def meta(the_case=nil)
|
5
5
|
if the_case.blank?
|
6
|
-
|
7
|
-
@metadata ||= defined?(get_meta) ? get_meta : {}
|
6
|
+
(@metadata ||= {})['_'] ||= defined?(get_meta) ? get_meta : {}
|
7
|
+
# @metadata ||= defined?(get_meta) ? get_meta : {}
|
8
8
|
else
|
9
|
-
|
10
|
-
@metadata ||= respond_to?("get_meta_#{the_case.to_s}") ? send("get_meta_#{the_case.to_s}") : []
|
9
|
+
(@metadata ||= {})[the_case] ||= respond_to?("get_meta_#{the_case.to_s}") ? send("get_meta_#{the_case.to_s}") : []
|
10
|
+
# @metadata ||= respond_to?("get_meta_#{the_case.to_s}") ? send("get_meta_#{the_case.to_s}") : []
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
@@ -31,7 +31,7 @@ module ALaChart
|
|
31
31
|
val = key_field.call(object)
|
32
32
|
elsif key_field.class == Fixnum
|
33
33
|
val = object[key_field] if object.respond_to?('[]')
|
34
|
-
|
34
|
+
elsif object.class != Array
|
35
35
|
val = object[key_field] if object.respond_to?('[]')
|
36
36
|
val = (object.respond_to?(key_field) ? object.send(key_field) : nil) if val.nil?
|
37
37
|
val
|
@@ -142,8 +142,12 @@ module ALaChart
|
|
142
142
|
cases = [attrs]
|
143
143
|
end
|
144
144
|
elsif attrs.size > 1
|
145
|
-
|
146
|
-
|
145
|
+
if attrs[-1].class == Hash
|
146
|
+
cases = attrs[0...-1]
|
147
|
+
options = attrs[-1]
|
148
|
+
else
|
149
|
+
cases = attrs[0..-1]
|
150
|
+
end
|
147
151
|
end
|
148
152
|
|
149
153
|
cases ||= []
|
data/lib/a_la_chart.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a_la_chart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Redmond
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-29 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|