class Manageheroku::Conf

Public Class Methods

new(conf_file) click to toggle source
# File lib/manageheroku/conf.rb, line 5
def initialize(conf_file)
  @conf_data = {}
  @conf_data = YAML.load(ERB.new(Pathname.new(conf_file).read).result)
end

Public Instance Methods

apps() click to toggle source
# File lib/manageheroku/conf.rb, line 20
def apps
  app_objects = @conf_data["apps"]
  return [] unless app_objects
  app_objects.map{|app_object| Manageheroku::App.new(app_object["name"], app_object)}
end
formations() click to toggle source
# File lib/manageheroku/conf.rb, line 14
def formations
  formation_objects = @conf_data["formations"]
  return [] unless formation_objects
  formation_objects.map{|formation_object| Manageheroku::Formation.new(formation_object["name"], formation_object["procs"]) }
end
oauth_token() click to toggle source
# File lib/manageheroku/conf.rb, line 10
def oauth_token
  @conf_data['oauth-token']
end