Class: SocialPoster::Poster::Twitter
- Inherits:
-
Object
- Object
- SocialPoster::Poster::Twitter
- Includes:
- Helper
- Defined in:
- lib/social_poster/poster/twitter.rb
Instance Method Summary collapse
-
#initialize ⇒ Twitter
constructor
A new instance of Twitter.
- #write(text, title) ⇒ Object
Methods included from Helper
Constructor Details
#initialize ⇒ Twitter
Returns a new instance of Twitter.
9 10 11 12 13 14 15 16 |
# File 'lib/social_poster/poster/twitter.rb', line 9 def initialize ::Twitter.configure do |config| config.consumer_key = config_key :consumer_key config.consumer_secret = config_key :consumer_secret config.oauth_token = config_key :oauth_token config.oauth_token_secret = config_key :oauth_token_secret end end |
Instance Method Details
#write(text, title) ⇒ Object
18 19 20 |
# File 'lib/social_poster/poster/twitter.rb', line 18 def write(text, title) ::Twitter.update(text) end |