Sha256: b2108e0da94131abc67c02df4a8c3f6cd77ec9fe2d557086bebeef55c874dd91

Contents?: true

Size: 607 Bytes

Versions: 9

Compression:

Stored size: 607 Bytes

Contents

require_relative 'daru/active_record_ext'
require_relative 'daru/data_frame_ext'

module JupyterOnRails
  class Railtie < ::Rails::Railtie
    rake_tasks do
      load 'jupyter_on_rails/railtie/jupyter.rake'
    end

    config.before_configuration do
      begin
        require 'daru'
      rescue LoadError
      end

      if defined?(::Daru) && defined?(::ActiveRecord)
        class ::ActiveRecord::Base
          include ::JupyterOnRails::Daru::ActiveRecordExt
        end
        class ::Daru::DataFrame
          include ::JupyterOnRails::Daru::DataFrameExt
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
jupyter_on_rails-0.6.0 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.5.6 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.5.5 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.5.4 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.5.3 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.5.2 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.5.1 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.5.0 lib/jupyter_on_rails/railtie.rb
jupyter_on_rails-0.4.2 lib/jupyter_on_rails/railtie.rb