Sha256: 09ae0ad4a673d863ca6070103f74eafca93dfbaad7daf87c581a051e9e8e0b79

Contents?: true

Size: 391 Bytes

Versions: 73

Compression:

Stored size: 391 Bytes

Contents

module Polars
  # @private
  class WhenThen
    attr_accessor :_rbwhenthen

    def initialize(rbwhenthen)
      self._rbwhenthen = rbwhenthen
    end

    def when(predicate)
      WhenThenThen.new(_rbwhenthen.when(predicate._rbexpr))
    end

    def otherwise(expr)
      expr = Utils.expr_to_lit_or_expr(expr)
      Utils.wrap_expr(_rbwhenthen.otherwise(expr._rbexpr))
    end
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
polars-df-0.2.1-x86_64-linux lib/polars/when_then.rb
polars-df-0.2.1-x86_64-darwin lib/polars/when_then.rb
polars-df-0.2.1-arm64-darwin lib/polars/when_then.rb
polars-df-0.2.1-aarch64-linux lib/polars/when_then.rb
polars-df-0.2.1 lib/polars/when_then.rb
polars-df-0.2.0-x86_64-linux lib/polars/when_then.rb
polars-df-0.2.0-x86_64-darwin lib/polars/when_then.rb
polars-df-0.2.0-arm64-darwin lib/polars/when_then.rb
polars-df-0.2.0-aarch64-linux lib/polars/when_then.rb
polars-df-0.2.0 lib/polars/when_then.rb
polars-df-0.1.5 lib/polars/when_then.rb
polars-df-0.1.4 lib/polars/when_then.rb
polars-df-0.1.3 lib/polars/when_then.rb