Class: DataOutput::DatasetOutput

Inherits:
BaseOutput show all
Defined in:
lib/output/data_output/dataset_output.rb

Overview

Parent class for data output and delta output

Direct Known Subclasses

DeltaOutput, ScaledOutput, SingleOutput

Instance Attribute Summary collapse

Attributes inherited from BaseOutput

#data_set, #legend, #with_extreme_values

Instance Method Summary collapse

Methods inherited from BaseOutput

#determine_output_type_and_print_value, #print_data, #print_data_and_get_extrema, #print_domain_information, #print_extreme_information, #print_extreme_values_for, #set_attributes

Instance Attribute Details

#meta_dataVisMetaData (readonly, private)

Returns the meta data for this output.

Returns:

  • (VisMetaData)

    the meta data for this output



13
14
15
# File 'lib/output/data_output/dataset_output.rb', line 13

def 
  @meta_data
end

Instance Method Details

This method is abstract.

subclasses need to implement this method

abstract method to print additional information before the x and y domain informations

Raises:

  • (NotImplementedError)

    if the subclass does not have this method



31
32
33
34
35
# File 'lib/output/data_output/dataset_output.rb', line 31

def print_meta_head
  fail NotImplementedError, " Error: the subclass #{self.class} needs " \
       "to implement the method: print_meta_tail " \
       "from its base class".red
end

prints the meta information consisting of dataset name and informations of the different dimensions



17
18
19
20
21
22
23
24
25
# File 'lib/output/data_output/dataset_output.rb', line 17

def print_meta_information
  print_meta_head

  print_domain_information(@meta_data.domain_x, "\nX")
  print_domain_information(@meta_data.domain_y, 'Y')

  print_meta_tail
  nil
end

method to print additional information after the x and y domain informations



39
40
41
# File 'lib/output/data_output/dataset_output.rb', line 39

def print_meta_tail
  nil # do nothing
end