lib/amee/session.rb in hookercookerman-amee-0.1.2 vs lib/amee/session.rb in hookercookerman-amee-0.1.3

- old
+ new

@@ -100,11 +100,13 @@ end # @return [Amee::DataApi::DataCategory] def get_data_category(path, options = {}) api_call(:get, "data.category", path, options) do |response| - Amee::DataApi::DataCategory.from_hash(response, self) + Amee::DataApi::DataCategory.from_hash(response, self) do |data_category| + data_category.lazy_loaded = true + end end end # @return [Amee::DataApi::DrillDown] def drill(path, options = {}) @@ -114,11 +116,13 @@ end # @return [Amee::DataApi::DataItem] def get_data_item(path, options = {}) api_call(:get, "data.item", path, options) do |response| - Amee::DataApi::DataItem.from_hash(response, self) + Amee::DataApi::DataItem.from_hash(response, self) do |data_item| + data_item.lazy_loaded = true + end end end # @return [Amee::DataApi::DataItemValue] def get_data_item_value(path, options ={}) @@ -185,17 +189,21 @@ end # @return [Amee::ProfileApi::ProfileCategory] def get_profile_category(path, options = {}) api_call(:get, "profile_category", path, options) do |response| - Amee::ProfileApi::ProfileCategory.from_hash(response, self) + Amee::ProfileApi::ProfileCategory.from_hash(response, self) do |profile_category| + profile_category.lazy_loaded = true + end end end # @return [Amee::ProfileApi::ProfileItem] def get_profile_item(path, options = {}) api_call(:get, "profile_item", path, options) do |response| - Amee::ProfileApi::ProfileItem.from_hash(response, self) + Amee::ProfileApi::ProfileItem.from_hash(response, self) do |profile_item| + profile_item.lazy_loaded = true + end end end # @return [Array[Amee::Profile]] def profiles \ No newline at end of file