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.4-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.4 lib/polars/expr_dispatch.rb
polars-df-0.2.3-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.3-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.3-arm64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.3-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.3 lib/polars/expr_dispatch.rb
polars-df-0.2.2-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.2-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.2-arm64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.2-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.2 lib/polars/expr_dispatch.rb
polars-df-0.2.1-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.1-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.1-arm64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.1-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.1 lib/polars/expr_dispatch.rb
polars-df-0.2.0-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.0-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.0-arm64-darwin lib/polars/expr_dispatch.rb