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.4.0-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.4.0 lib/polars/expr_dispatch.rb
polars-df-0.3.1-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.3.1-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.3.1-arm64-darwin lib/polars/expr_dispatch.rb
polars-df-0.3.1-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.3.1 lib/polars/expr_dispatch.rb
polars-df-0.3.0-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.3.0-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.3.0-arm64-darwin lib/polars/expr_dispatch.rb
polars-df-0.3.0-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.3.0 lib/polars/expr_dispatch.rb
polars-df-0.2.5-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.5-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.5-arm64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.5-aarch64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.5 lib/polars/expr_dispatch.rb
polars-df-0.2.4-x86_64-linux lib/polars/expr_dispatch.rb
polars-df-0.2.4-x86_64-darwin lib/polars/expr_dispatch.rb
polars-df-0.2.4-arm64-darwin lib/polars/expr_dispatch.rb