Sha256: 21376fb21d1515b24dcaf715acf7bac7eb570e47a40775364433469568e56717

Contents?: true

Size: 381 Bytes

Versions: 9

Compression:

Stored size: 381 Bytes

Contents

module Hyperstack
  class ActingUser
    @default_options = {
      :nils => false   # true allows an explicit nil to be valid. Overrides any other options
    }

    def filter(data)

      # Handle nil case
      if data.nil?
        return [nil, nil] if options[:nils]
        return [nil, :nils]
      end

      # otherwise, we win.
      return [data, nil]
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyper-operation-1.0.alpha1.8 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1.7 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1.6 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1.5 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1.4 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1.3 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1.2 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1.1 lib/hyper-operation/filters/acting_user.rb
hyper-operation-1.0.alpha1 lib/hyper-operation/filters/acting_user.rb