Class: PanicBoardData::Graph

Inherits:
Object
  • Object
show all
Defined in:
lib/panic_board_data/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGraph

Returns a new instance of Graph.


12
13
14
# File 'lib/panic_board_data/graph.rb', line 12

def initialize
  @data_sequences = []
end

Instance Attribute Details

#colorObject

Returns the value of attribute color


9
10
11
# File 'lib/panic_board_data/graph.rb', line 9

def color
  @color
end

#data_sequencesObject

Returns the value of attribute data_sequences


10
11
12
# File 'lib/panic_board_data/graph.rb', line 10

def data_sequences
  @data_sequences
end

#titleObject

Returns the value of attribute title


9
10
11
# File 'lib/panic_board_data/graph.rb', line 9

def title
  @title
end

#totalObject

Returns the value of attribute total


9
10
11
# File 'lib/panic_board_data/graph.rb', line 9

def total
  @total
end

#typeObject

Returns the value of attribute type


9
10
11
# File 'lib/panic_board_data/graph.rb', line 9

def type
  @type
end

Instance Method Details

#to_hashObject


16
17
18
19
20
# File 'lib/panic_board_data/graph.rb', line 16

def to_hash
  { 
    'graph' => graph
  }
end

#to_jsonObject


22
23
24
# File 'lib/panic_board_data/graph.rb', line 22

def to_json
  to_hash.to_json
end