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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{amee}
5
- s.version = '0.1.5'
5
+ s.version = '0.1.6'
6
6
 
7
7
  s.homepage = 'http://github.com/hookercookerman/amee/tree/master'
8
8
  s.description = %q{Its a gem to interact with the amee api}
@@ -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
@@ -36,5 +36,5 @@ require "amee/profile_api/profile_category"
36
36
  require "amee/profile_api/profile"
37
37
 
38
38
  module Amee
39
- VERSION = '0.1.5'
39
+ VERSION = '0.1.6'
40
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hookercookerman-amee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Hooker