Sha256: e881be6f600f41d1bbf5b20d0d22a158544a927a92d43381cd1575d00e613dbe
Contents?: true
Size: 697 Bytes
Versions: 13
Compression:
Stored size: 697 Bytes
Contents
require 'scalingo_backups_manager/configuration' module ScalingoBackupsManager class Application class << self def client Configuration.client end def all client.apps.all&.data || [] end def find(id) app = client.apps.find(id)&.data self.new(app) end end attr_accessor :application def initialize(app) @application = app end [:id, :name].each do |attr_name| define_method attr_name do application[attr_name] end end def client self.class.client end def addons self.class.client.addons.for(application[:id])&.data || [] end end end
Version data entries
13 entries across 13 versions & 1 rubygems