module Gouteur::Dotfile

interface for gouteur's configuration dotfile

Public Instance Methods

content() click to toggle source
# File lib/gouteur/dotfile.rb, line 14
def content
  @content ||=
    present? ? YAML.safe_load(File.read(path), symbolize_names: true) : {}
end
path() click to toggle source
# File lib/gouteur/dotfile.rb, line 10
def path
  File.join(Host.root, '.gouteur.yml')
end
present?() click to toggle source
# File lib/gouteur/dotfile.rb, line 6
def present?
  File.exist?(path)
end
repos() click to toggle source
# File lib/gouteur/dotfile.rb, line 19
def repos
  (content[:repos] || []).map { |attrs| Gouteur::Repo.new(**attrs) }
end