Class: Zanox::AdMedium
Instance Attribute Summary collapse
-
#adrank ⇒ Object
readonly
Returns the value of attribute adrank.
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#program ⇒ Object
readonly
Returns the value of attribute program.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#tracking_links ⇒ Object
readonly
Returns the value of attribute tracking_links.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ AdMedium
constructor
-
pid (Integer) AdMedium ID - name (String) The name of the admedium - adrank (String) The adrank of the admedium - type (String) The type of the admedium (html, script, image, imagetext, text) - program (String) The program of the admedium - title (String) The title of the admedium - description (String) The description of the admedium - category (String) The category of the admedium (GET /admedia/categories/program/id) - tracking_links (Hash[]) The list of the tracking links for the admedium.
-
Methods included from Hashable
Constructor Details
#initialize(data) ⇒ AdMedium
-
pid (Integer) AdMedium ID
-
name (String) The name of the admedium
-
adrank (String) The adrank of the admedium
-
type (String) The type of the admedium (html, script, image, imagetext, text)
-
program (String) The program of the admedium
-
title (String) The title of the admedium
-
description (String) The description of the admedium
-
category (String) The category of the admedium (GET /admedia/categories/program/id)
-
tracking_links (Hash[]) The list of the tracking links for the admedium
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/zanox/resources/admedium.rb', line 40 def initialize(data) @pid = data['@id'].to_i @name = data['name'] @adrank = data['adrank'] @type = data['admediumType'] @program = { id: data['program']['@id'].to_i, name: data['program']['$'] } @title = data['title'] @description = data['description'] @category = parse_category(data) @tracking_links = parse_tracking_links(data) end |
Instance Attribute Details
#adrank ⇒ Object (readonly)
Returns the value of attribute adrank.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def adrank @adrank end |
#category ⇒ Object (readonly)
Returns the value of attribute category.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def category @category end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def description @description end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def name @name end |
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def pid @pid end |
#program ⇒ Object (readonly)
Returns the value of attribute program.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def program @program end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def title @title end |
#tracking_links ⇒ Object (readonly)
Returns the value of attribute tracking_links.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def tracking_links @tracking_links end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
27 28 29 |
# File 'lib/zanox/resources/admedium.rb', line 27 def type @type end |