lib/arql.rb in arql-0.4.3 vs lib/arql.rb in arql-0.4.6

- old
+ new

@@ -1,5 +1,6 @@ +ENV['RAILS_DISABLE_DEPRECATED_TO_S_CONVERSION'] = 'true' require 'table_print' require 'roo' require 'caxlsx' require 'csv' require 'net/ssh/gateway' @@ -22,7 +23,21 @@ require 'arql/ext/active_record/base' require 'arql/ext/active_record/relation' require 'arql/ext/active_record/result' require 'arql/ext/ransack/search' +$iruby = false + module Arql + def self.create(options) + if ::Object.const_defined?(:IRuby) && ::IRuby.const_defined?(:OStream) && $stdout.is_a?(IRuby::OStream) + IRuby::Kernel.instance.switch_backend!(:pry) + $iruby = true + end + App.create(options) + end end + +if ::Object.const_defined?(:IRuby) + require 'arql/chart' + ::Kernel.include(Arql::Chart) +end \ No newline at end of file