You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
394 B

require 'cross-post/config'
require 'cross-post/mastodon'
require 'cross-post/twitter'
class CrossPost
def initialize
@config = Config.new
@mastodon = Mastodon.new @config
@twitter = Twitter.new @config
end
def post(text)
@mastodon.post text
end
def feed
@mastodon.feed @twitter
end
def self.post(text)
self.new.post text
end
def self.feed
self.new.feed
end
end