Class: Wikirate4ruby::Entities::Topic
- Defined in:
- lib/wikirate4ruby/entities/topic.rb
Constant Summary collapse
- ATTRIBUTES =
%i[bookmarkers metrics datasets].freeze
Constants inherited from Card
Instance Method Summary collapse
-
#initialize(topic) ⇒ Topic
constructor
A new instance of Topic.
Methods inherited from Card
#as_json, #raw_json, #to_json, #to_s
Constructor Details
#initialize(topic) ⇒ Topic
Returns a new instance of Topic.
9 10 11 12 13 14 15 16 17 |
# File 'lib/wikirate4ruby/entities/topic.rb', line 9 def initialize(topic) super topic raise parsing_error name = "IncompatibleCardType", = "The input Card is not a Topic but a #{@type}" if @type != 'Topic' @bookmarkers = get_content 'bookmarkers' @metrics = get_content 'metrics' @datasets = get_content 'datasets' end |