Sha256: 139de37714c46265736f1fff1e6322d4ca8ebfdca721733dfcd570e3648870d2
Contents?: true
Size: 484 Bytes
Versions: 5
Compression:
Stored size: 484 Bytes
Contents
# frozen_string_literal: true require_relative 'fb_api' require_relative 'posting' module FansWatch # Main class to setup a Facebook group class Page attr_reader :name, :id, :feed def initialize(page_data:) @name = page_data['name'] @id = page_data['id'] @feed = Feed.new(feed_data: @id) end def self.find(id:) page_data = FbApi.page_info(id) page_data.include?('error') ? nil : new(page_data: page_data) end end end
Version data entries
5 entries across 5 versions & 1 rubygems