Class: ACTV::AssetStatsResult

Inherits:
Base
  • Object
show all
Defined in:
lib/actv/asset_stats_result.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, #delete, from_response, #memoize, #method_missing, object_attr_reader, #respond_to?, #to_hash, #update, uri_attr_reader

Constructor Details

#initialize(options) ⇒ AssetStatsResult

Returns a new instance of AssetStatsResult.



5
6
7
8
9
# File 'lib/actv/asset_stats_result.rb', line 5

def initialize options
  @updated_at = options[:updatedAt]
  @asset_guid = options[:assetGuid]
  @page_views = options.fetch :pageViews, 0
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ACTV::Base

Instance Attribute Details

#asset_guidObject (readonly)

Returns the value of attribute asset_guid.



3
4
5
# File 'lib/actv/asset_stats_result.rb', line 3

def asset_guid
  @asset_guid
end

#page_viewsObject (readonly)

Returns the value of attribute page_views.



3
4
5
# File 'lib/actv/asset_stats_result.rb', line 3

def page_views
  @page_views
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



3
4
5
# File 'lib/actv/asset_stats_result.rb', line 3

def updated_at
  @updated_at
end