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