module Daru::View

Constants

VERSION

Public Class Methods

generate_init_code_css(dependent_css) click to toggle source
# File lib/daru/data_tables/display/iruby_notebook.rb, line 15
def self.generate_init_code_css(dependent_css)
  css_dir = File.expand_path(
    '../../../../vendor/assets/stylesheets', __dir__
  )
  path = File.expand_path('../templates/init.inline.css.erb', __dir__)
  template = File.read(path)
  ERB.new(template).result(binding)
end
generate_init_code_js(dependent_js) click to toggle source

generate initializing code

# File lib/daru/data_tables/display/iruby_notebook.rb, line 6
def self.generate_init_code_js(dependent_js)
  js_dir = File.expand_path(
    '../../../../vendor/assets/javascripts', __dir__
  )
  path = File.expand_path('../templates/init.inline.js.erb', __dir__)
  template = File.read(path)
  ERB.new(template).result(binding)
end