class Config
Attributes
auth[R]
cutoff_date[R]
cutoff_timestamp[R]
Public Class Methods
new(host:, token:, days:)
click to toggle source
# File lib/config.rb, line 4 def initialize(host:, token:, days:) require 'date' @cutoff_date = Date.today - days.to_i @cutoff_timestamp = @cutoff_date.to_time.to_i @auth = { :host => host, :token => token } end
Public Instance Methods
load_env()
click to toggle source
# File lib/config.rb, line 14 def load_env require 'dotenv' begin Dotenv.load rescue p 'Could not load environment variables.' exit(false) end end