Class: PhantomGraph::Setting
Instance Attribute Summary collapse
Instance Method Summary collapse
- #current_file(filename) ⇒ Object
-
#initialize ⇒ Setting
constructor
A new instance of Setting.
Methods inherited from Base
Constructor Details
#initialize ⇒ Setting
Returns a new instance of Setting.
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/phantom_graph/setting.rb', line 20 def initialize @default_options = { logger: false, auto_process: true, phantom_js_path: phantomjs, highcharts_convert_path: current_file("highcharts-convert.js"), highcharts_theme_path: current_file("gray.js"), highstock_path: current_file("highstock.js"), highcharts_path: current_file("highcharts.js"), jquery_path: current_file("jquery.js") } end |
Instance Attribute Details
#phantomjs ⇒ Object
33 34 35 |
# File 'lib/phantom_graph/setting.rb', line 33 def phantomjs @phantomjs ||= (defined?(Bundler) ? `bundle exec which phantomjs` : `which phantomjs`).chomp end |
Instance Method Details
#current_file(filename) ⇒ Object
37 38 39 |
# File 'lib/phantom_graph/setting.rb', line 37 def current_file(filename) File.(File.dirname(__FILE__)) + "/js/#{filename}" end |