hookercookerman-amee 0.1.5 → 0.1.6
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.
- data/amee.gemspec +1 -1
- data/lib/amee/data_api/data_category.rb +14 -1
- data/lib/amee.rb +1 -1
- metadata +1 -1
data/amee.gemspec
CHANGED
@@ -25,11 +25,24 @@ module Amee
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
# when drilling the end goal is to get a data_item
|
29
|
+
# if we can get a data_item it is given if not nil will be
|
30
|
+
# return
|
31
|
+
# @param [Hash] selection of what we wish to drill down
|
32
|
+
# @return [Amee::DataApi::DataItem]
|
33
|
+
# @return [Nil] if could not get the uid of the data_category ie not drilled far enough
|
34
|
+
def drill_to_data_item(selection = {})
|
35
|
+
if drilled = drill(selection)
|
36
|
+
if data_item_uid = drilled.data_item_uid
|
37
|
+
session.get_data_item("#{self.full_path}/#{data_item_uid}")
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
28
42
|
def can_drill?
|
29
43
|
!data_items.empty?
|
30
44
|
end
|
31
45
|
|
32
|
-
|
33
46
|
# lets delagate this one
|
34
47
|
def drill_down
|
35
48
|
item_definition && item_definition.drill_down
|
data/lib/amee.rb
CHANGED