Sha256: 9be96ebd28ce7a5f1f1962527c3da535f235d39b042862563d8f510abc722b07

Contents?: true

Size: 361 Bytes

Versions: 3

Compression:

Stored size: 361 Bytes

Contents

module Sendle
  module Api
    class Utils

      class << self

        def symbolize_strings(array_string)
          array_string.map { |x| x.to_sym }
        end

        def nullish?(v)
          v.nil? || v.to_s.empty?
        end

        def hash_contains?(hash, key)
          hash.key?(key) && !hash[key].nil?
        end

      end

    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sendle-api-0.0.13 lib/sendle/api/utils.rb
sendle-api-0.0.12 lib/sendle/api/utils.rb
sendle-api-0.0.11 lib/sendle/api/utils.rb