Class: RCharts::GraphHelper::Graph::Options

Inherits:
Object
  • Object
show all
Defined in:
app/helpers/rcharts/graph_helper/graph/options.rb

Overview

:nodoc:

Constant Summary collapse

DEFAULTS =
{ x: { 0 => { values_method: :keys } }, y: { 0 => { values_method: :values } } }.freeze

Instance Method Summary collapse

Constructor Details

#initialize(keys, options) ⇒ Options

Returns a new instance of Options.



9
10
11
12
# File 'app/helpers/rcharts/graph_helper/graph/options.rb', line 9

def initialize(keys, options)
  @keys = keys
  @options = options
end

Instance Method Details

#to_hObject



14
15
16
# File 'app/helpers/rcharts/graph_helper/graph/options.rb', line 14

def to_h(&)
  DEFAULTS.deep_merge(normalized_options).to_h(&)
end