Class: Highcharts::MainController

Inherits:
Volt::ModelController
  • Object
show all
Defined in:
app/highcharts/controllers/main_controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#chartObject (readonly)

Returns the value of attribute chart.



9
10
11
# File 'app/highcharts/controllers/main_controller.rb', line 9

def chart
  @chart
end

#reactiveObject (readonly)

Returns the value of attribute reactive.



9
10
11
# File 'app/highcharts/controllers/main_controller.rb', line 9

def reactive
  @reactive
end

#watch_countsObject (readonly)

Returns the value of attribute watch_counts.



9
10
11
# File 'app/highcharts/controllers/main_controller.rb', line 9

def watch_counts
  @watch_counts
end

#watchesObject (readonly)

Returns the value of attribute watches.



9
10
11
# File 'app/highcharts/controllers/main_controller.rb', line 9

def watches
  @watches
end

Instance Method Details

#before_index_removeObject



17
18
19
20
21
# File 'app/highcharts/controllers/main_controller.rb', line 17

def before_index_remove
  stop_watching
  destroy_chart
  @chart = nil
end

#index_readyObject



11
12
13
14
15
# File 'app/highcharts/controllers/main_controller.rb', line 11

def index_ready
  set_model
  create_chart
  start_watching
end