Class: GitHandler::Configuration
- Inherits:
-
Object
- Object
- GitHandler::Configuration
- Defined in:
- lib/git_handler/configuration.rb
Instance Attribute Summary collapse
-
#home_path ⇒ Object
readonly
Returns the value of attribute home_path.
-
#log_path ⇒ Object
readonly
Returns the value of attribute log_path.
-
#repos_path ⇒ Object
readonly
Returns the value of attribute repos_path.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
Initialize a new Configuration instance with options hash.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Initialize a new Configuration instance with options hash
Valid options:
:user - Git user
:home_path - Git user home path
:repos_path - Path to repositories
:log_path - Git access log path
16 17 18 19 20 21 |
# File 'lib/git_handler/configuration.rb', line 16 def initialize(={}) @user = [:user] || 'git' @home_path = [:home_path] || '/home/git' @repos_path = [:repos_path] || File.join(@home_path, 'repositories') @log_path = [:log_path] || File.join(@home_path, 'access.log') end |
Instance Attribute Details
#home_path ⇒ Object (readonly)
Returns the value of attribute home_path.
4 5 6 |
# File 'lib/git_handler/configuration.rb', line 4 def home_path @home_path end |
#log_path ⇒ Object (readonly)
Returns the value of attribute log_path.
6 7 8 |
# File 'lib/git_handler/configuration.rb', line 6 def log_path @log_path end |
#repos_path ⇒ Object (readonly)
Returns the value of attribute repos_path.
5 6 7 |
# File 'lib/git_handler/configuration.rb', line 5 def repos_path @repos_path end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
3 4 5 |
# File 'lib/git_handler/configuration.rb', line 3 def user @user end |