Class: Analytica::DataSystem

Inherits:
Array
  • Object
show all
Includes:
Visualization::DataSystem, Visualization::Representation
Defined in:
lib/analytica.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Visualization::DataSystem

#datamax, #to_bargraph, #to_linegraph

Methods included from Visualization::Representation

#add_custom, #bar_settings, #common_options, #generate_custom, #generate_labels, #generate_title, #set_labels, #set_title

Constructor Details

#initialize(datasets = []) ⇒ DataSystem

Returns a new instance of DataSystem.



66
67
68
69
70
71
72
73
74
75
76
# File 'lib/analytica.rb', line 66

def initialize(datasets=[])
  enforce!(:dataset_array, datasets)

  @custom = ""
  @custom_set = false

  @labels = {}
  @labels_set = false

  super datasets
end

Instance Attribute Details

#labelsObject

Returns the value of attribute labels.



64
65
66
# File 'lib/analytica.rb', line 64

def labels
  @labels
end

Instance Method Details

#+(other) ⇒ Object



90
91
92
93
94
# File 'lib/analytica.rb', line 90

def +(other)
  enforce!(:dataset_array, other)

  super other
end

#<<(object) ⇒ Object



78
79
80
81
82
# File 'lib/analytica.rb', line 78

def <<(object)
  enforce_primitive!(DataSet, object)

  super object
end

#concat(other) ⇒ Object



84
85
86
87
88
# File 'lib/analytica.rb', line 84

def concat(other)
  enforce!(:dataset_array, other)

  super datasets
end