Class: CrossPost

Inherits:
Object
  • Object
show all
Defined in:
lib/cross-post.rb,
lib/cross-post/config.rb,
lib/cross-post/version.rb,
lib/cross-post/mastodon.rb,
lib/cross-post/twitter.rb

Defined Under Namespace

Classes: Config, Mastodon, Twitter

Constant Summary collapse

LOGGER =
Logger.new STDERR
VERSION =
'0.2.0'.freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCrossPost

Returns a new instance of CrossPost.



22
23
24
25
26
# File 'lib/cross-post.rb', line 22

def initialize
	@config   = Config.new
	@mastodon = Mastodon.new @config
	@twitter  = Twitter.new @config
end

Instance Attribute Details

#mastodonObject (readonly)

Returns the value of attribute mastodon.



20
21
22
# File 'lib/cross-post.rb', line 20

def mastodon
  @mastodon
end

#twitterObject (readonly)

Returns the value of attribute twitter.



20
21
22
# File 'lib/cross-post.rb', line 20

def twitter
  @twitter
end

Class Method Details

.feedObject



32
33
34
# File 'lib/cross-post.rb', line 32

def self.feed
	self.new.feed
end

Instance Method Details

#feedObject



28
29
30
# File 'lib/cross-post.rb', line 28

def feed
	@mastodon.feed @twitter
end