class GitSnip::Config

Public Class Methods

new(repo_path = '.') click to toggle source
# File lib/git_snip/config.rb, line 7
def initialize(repo_path = '.')
  @repo_path = repo_path
end

Public Instance Methods

options() click to toggle source
# File lib/git_snip/config.rb, line 11
def options
  @options ||= read_file || {}
end

Private Instance Methods

config_path() click to toggle source
# File lib/git_snip/config.rb, line 21
def config_path
  "#{@repo_path.chomp('/')}/.git_snip.yml"
end
read_file() click to toggle source
# File lib/git_snip/config.rb, line 17
def read_file
  YAML.load_file(config_path) if File.exist?(config_path)
end