Sha256: ba615a5bca652afcbc1054484b241bdf3871de23134845b20e58710b6f18e83b

Contents?: true

Size: 499 Bytes

Versions: 84

Compression:

Stored size: 499 Bytes

Contents

module Polars
  # @private
  module ExprDispatch
    private

    def self.included(base)
      base.attr_accessor :_s
      base.singleton_class.attr_accessor :_accessor
    end

    def method_missing(method, ...)
      return super unless self.class.method_defined?(method)

      namespace = self.class._accessor

      s = Utils.wrap_s(_s)
      expr = Utils.col(s.name)
      expr = expr.send(namespace) if namespace
      s.to_frame.select(expr.send(method, ...)).to_series
    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
polars-df-0.2.0-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.0 lib/polars/expr_dispatch.rb
polars-df-0.1.5 lib/polars/expr_dispatch.rb
polars-df-0.1.4 lib/polars/expr_dispatch.rb