Module: TwitterFriendly::Utils
- Included in:
- Client
- Defined in:
- lib/twitter_friendly/utils.rb
Instance Method Summary collapse
- #authenticating_user?(target) ⇒ Boolean
- #authorized_user?(target) ⇒ Boolean
- #uid_or_screen_name?(object) ⇒ Boolean
Instance Method Details
#authenticating_user?(target) ⇒ Boolean
8 9 10 11 |
# File 'lib/twitter_friendly/utils.rb', line 8 def authenticating_user?(target) raise NotImplementedError.new("You must implement ##{__method__}.") user.id.to_i == user(target).id.to_i end |
#authorized_user?(target) ⇒ Boolean
13 14 15 16 17 |
# File 'lib/twitter_friendly/utils.rb', line 13 def (target) raise NotImplementedError.new("You must implement ##{__method__}.") target_user = user(target) !target_user.protected? || friendship?(user.id.to_i, target_user.id.to_i) end |
#uid_or_screen_name?(object) ⇒ Boolean
3 4 5 6 |
# File 'lib/twitter_friendly/utils.rb', line 3 def uid_or_screen_name?(object) raise NotImplementedError.new("You must implement ##{__method__}.") object.kind_of?(String) || object.kind_of?(Integer) end |