Class: Tweet
- Inherits:
-
Object
- Object
- Tweet
- Includes:
- DataMapper::Resource
- Defined in:
- lib/campfire/polling_bot/plugins/tweet/tweet.rb
Overview
used by TweetPlugin
Defined Under Namespace
Classes: TwitterError
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.list ⇒ Object
30 31 32 |
# File 'lib/campfire/polling_bot/plugins/tweet/tweet.rb', line 30 def self.list all(:order => [:timestamp.asc]) end |
.tweet(message, user, pass, proxy = nil) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/campfire/polling_bot/plugins/tweet/tweet.rb', line 21 def self.tweet(, user, pass, proxy=nil) result = post(, user, pass, proxy) if result.code == 200 return true else raise TwitterError.new(result.body) end end |
Instance Method Details
#to_s ⇒ Object
34 35 36 |
# File 'lib/campfire/polling_bot/plugins/tweet/tweet.rb', line 34 def to_s end |
#tweet(user, pass, proxy = nil) ⇒ Object
17 18 19 |
# File 'lib/campfire/polling_bot/plugins/tweet/tweet.rb', line 17 def tweet(user, pass, proxy=nil) self.class.tweet(, user, pass, proxy) end |