Sha256: d83a9525112c4262617ca03969e33efa8637e302fd799e9e63f1bd11a4fd8c03

Contents?: true

Size: 285 Bytes

Versions: 42

Compression:

Stored size: 285 Bytes

Contents

class SlackSmartBot

  def remove_hash_keys(hash, key)
    newh = Hash.new
    hash.each do |k, v|
      unless k == key
        if v.is_a?(String)
          newh[k] = v
        else
          newh[k] = remove_hash_keys(v, key)
        end
      end
    end
    return newh
  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
slack-smart-bot-1.15.25 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.15.1 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.15.0 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.14.2 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.14.1 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.14.0 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.13.2 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.13.1 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.13.0 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.9 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.8 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.7 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.6 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.5 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.4 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.3 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.2 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.1 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.12.0 lib/slack/smart-bot/utils/remove_hash_keys.rb
slack-smart-bot-1.11.0 lib/slack/smart-bot/utils/remove_hash_keys.rb