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.5-x86_64-linux lib/polars/when_then.rb
polars-df-0.2.5-x86_64-darwin lib/polars/when_then.rb
polars-df-0.2.5-arm64-darwin lib/polars/when_then.rb
polars-df-0.2.5-aarch64-linux lib/polars/when_then.rb
polars-df-0.2.5 lib/polars/when_then.rb
polars-df-0.2.4-x86_64-linux lib/polars/when_then.rb
polars-df-0.2.4-x86_64-darwin lib/polars/when_then.rb
polars-df-0.2.4-arm64-darwin lib/polars/when_then.rb
polars-df-0.2.4-aarch64-linux lib/polars/when_then.rb
polars-df-0.2.4 lib/polars/when_then.rb
polars-df-0.2.3-x86_64-linux lib/polars/when_then.rb
polars-df-0.2.3-x86_64-darwin lib/polars/when_then.rb
polars-df-0.2.3-arm64-darwin lib/polars/when_then.rb
polars-df-0.2.3-aarch64-linux lib/polars/when_then.rb
polars-df-0.2.3 lib/polars/when_then.rb
polars-df-0.2.2-x86_64-linux lib/polars/when_then.rb
polars-df-0.2.2-x86_64-darwin lib/polars/when_then.rb
polars-df-0.2.2-arm64-darwin lib/polars/when_then.rb
polars-df-0.2.2-aarch64-linux lib/polars/when_then.rb
polars-df-0.2.2 lib/polars/when_then.rb