Class: ACTV::Article
Instance Attribute Summary collapse
Attributes inherited from Asset
#activityEndDate, #activityEndTime, #activityStartDate, #activityStartTime, #assetDsc, #assetGuid, #assetName, #authorName, #contactEmailAdr, #contactName, #contactPhone, #contactTxt, #createdDate, #currencyCd, #homePageUrlAdr, #isRecurring, #is_article, #is_event, #modifiedDate, #publishDate, #regReqGenderCd, #regReqMaxAge, #regReqMinAge, #showContact
Attributes inherited from Base
#attrs
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Asset
#acm?, #activenet?, #attribute_paths, #attributes, #awcamps30?, #awcamps?, #awendurance?, #awsports?, #category_is?, #channels, #components, #description, #description_by_type, #descriptions, #endurance_id, #evergreen?, #first_topic, #first_topic_name, #first_topic_path, from_response, #has_location?, #image_by_name, #image_path, #image_with_placeholder, #images, inherited, #is_event?, #kids?, #leagueone?, #legacy_data, #location_path, #media_url, #meta_interest_paths, #meta_interests, #org_timezone, #organization, #place, #place_timezone, #prices, #recurrences, #references, #regcenter2?, #regcenter?, #registration_status, #researched?, #seo_url, #seo_urls, #status, #sub_2_topic, #sub_2_topic_path, #sub_3_topic, #sub_3_topic_path, #sub_4_topic, #sub_4_topic_path, #sub_topic, #sub_topic_path, #summary, #tag_by_description, #tags, #tennislinkteam?, #tennislinktournament?, #tennislinkusta?, #thriva?, #topics, types, #version, #visible?
Methods inherited from Identity
#==, #id, #initialize
Methods inherited from Base
#[], attr_reader, define_attribute_method, define_predicate_method, define_uri_method, #delete, from_response, #initialize, #memoize, #method_missing, object_attr_reader, #respond_to?, #to_hash, #update, uri_attr_reader
Constructor Details
This class inherits a constructor from ACTV::Identity
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class ACTV::Base
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
7
8
9
|
# File 'lib/actv/article.rb', line 7
def author
@author
end
|
Class Method Details
.valid?(response) ⇒ Boolean
Instance Method Details
#author_name_from_by_line ⇒ Object
55
56
57
58
|
# File 'lib/actv/article.rb', line 55
def author_name_from_by_line
author_name_regex = /by (.*)/i.match by_line
author_name_regex[1].strip if author_name_regex.present?
end
|
#by_line ⇒ Object
47
48
49
|
# File 'lib/actv/article.rb', line 47
def by_line
@by_line ||= description_by_type 'articleByLine'
end
|
34
35
36
|
# File 'lib/actv/article.rb', line 34
def
@footer ||= description_by_type 'footer'
end
|
#image ⇒ Object
26
27
28
|
# File 'lib/actv/article.rb', line 26
def image
@image ||= image_by_name 'image2'
end
|
#inline_ad ⇒ Object
Also known as:
inline_ad?
38
39
40
|
# File 'lib/actv/article.rb', line 38
def inline_ad
@inline_ad ||= resolve_inline_ad_tag
end
|
#is_article? ⇒ Boolean
51
52
53
|
# File 'lib/actv/article.rb', line 51
def is_article?
true
end
|
22
23
24
|
# File 'lib/actv/article.rb', line 22
def media_gallery?
type && type.downcase == "mediagallery"
end
|
#source ⇒ Object
14
15
16
|
# File 'lib/actv/article.rb', line 14
def source
@source ||= description_by_type 'articleSource'
end
|
#subtitle ⇒ Object
30
31
32
|
# File 'lib/actv/article.rb', line 30
def subtitle
@subtitle ||= description_by_type 'subtitle'
end
|
#type ⇒ Object
18
19
20
|
# File 'lib/actv/article.rb', line 18
def type
@type ||= tag_by_description 'articleType'
end
|