class ZooniverseSocial::Data
Public Class Methods
current()
click to toggle source
# File lib/zooniverse_social/data.rb, line 26 def self.current { posts: posts.data, tweets: tweets.data, statuses: statuses.data } end
posts()
click to toggle source
# File lib/zooniverse_social/data.rb, line 10 def self.posts @posts ||= Posts.new end
sources()
click to toggle source
# File lib/zooniverse_social/data.rb, line 22 def self.sources [posts, tweets, statuses] end
start()
click to toggle source
# File lib/zooniverse_social/data.rb, line 38 def self.start task = Concurrent::TimerTask.new(execution_interval: 600, timeout_interval: 20, run_now: true){ update }.execute TaskObserver.new task, method(:start) end
statuses()
click to toggle source
# File lib/zooniverse_social/data.rb, line 18 def self.statuses @statuses ||= Statuses.new end
tweets()
click to toggle source
# File lib/zooniverse_social/data.rb, line 14 def self.tweets @tweets ||= Tweets.new end
update()
click to toggle source
# File lib/zooniverse_social/data.rb, line 34 def self.update sources.each &:update end