Class: EacGit::Local::Subrepo::Config
- Inherits:
-
Object
- Object
- EacGit::Local::Subrepo::Config
- Defined in:
- lib/eac_git/local/subrepo/config.rb
Constant Summary collapse
- MAPPING =
{ command_version: :cmdver, commit_id: :commit, join_method: :method, parent_commit_id: :parent, remote_branch: :branch, remote_uri: :remote }.freeze
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_file(file_path) ⇒ Object
13 14 15 16 17 |
# File 'lib/eac_git/local/subrepo/config.rb', line 13 def from_file(file_path) new( ::ParseConfig.new(file_path.to_pathname)['subrepo'] ) end |
Instance Method Details
#to_content ⇒ Object
34 35 36 |
# File 'lib/eac_git/local/subrepo/config.rb', line 34 def to_content "[subrepo]\n" + MAPPING.map { |k, v| " #{v} = #{send(k)}\n" }.join # rubocop:disable Style/StringConcatenation end |