Class: RubyGitCrypt::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_git_crypt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



80
81
82
83
84
85
86
87
# File 'lib/ruby_git_crypt.rb', line 80

def initialize
  @binary = 'git-crypt'
  @logger = default_logger
  @options = default_options
  @stdin = nil
  @stdout = $stdout
  @stderr = $stderr
end

Instance Attribute Details

#binaryObject

Returns the value of attribute binary.



68
69
70
# File 'lib/ruby_git_crypt.rb', line 68

def binary
  @binary
end

#loggerObject

Returns the value of attribute logger.



68
69
70
# File 'lib/ruby_git_crypt.rb', line 68

def logger
  @logger
end

#optionsObject

Returns the value of attribute options.



68
69
70
# File 'lib/ruby_git_crypt.rb', line 68

def options
  @options
end

#stderrObject

Returns the value of attribute stderr.



68
69
70
# File 'lib/ruby_git_crypt.rb', line 68

def stderr
  @stderr
end

#stdinObject

Returns the value of attribute stdin.



68
69
70
# File 'lib/ruby_git_crypt.rb', line 68

def stdin
  @stdin
end

#stdoutObject

Returns the value of attribute stdout.



68
69
70
# File 'lib/ruby_git_crypt.rb', line 68

def stdout
  @stdout
end

Instance Method Details

#default_loggerObject



70
71
72
73
74
# File 'lib/ruby_git_crypt.rb', line 70

def default_logger
  logger = Logger.new($stdout)
  logger.level = Logger::INFO
  logger
end

#default_optionsObject



76
77
78
# File 'lib/ruby_git_crypt.rb', line 76

def default_options
  Options::Factory.new(Options::DEFINITIONS)
end