Class: Hash

Inherits:
Object show all
Defined in:
lib/tweep/core_exts.rb

Overview

Tweep - Automatic Twitter Peeping Lets me rotate through tweets in a scheduled manner, with multiple accounts, and auto-retweet such tweets on other accounts yet.

© 2011 Christophe Porteneuve

Instance Method Summary collapse

Instance Method Details

#slice(*keys) ⇒ Object

:nodoc: Inspired by ActiveSupport



13
14
15
16
17
18
# File 'lib/tweep/core_exts.rb', line 13

def slice(*keys)
  inject({}) do |acc, (k, v)|
    acc[k] = v if keys.include?(k)
    acc
  end
end