class Gitl::WorkSpaceConfig

Attributes

remote_branch[R]
workspace_branch[R]

Public Class Methods

load_file(yaml_filename) click to toggle source
# File lib/config/work_space_config.rb, line 12
def self.load_file(yaml_filename)
  node = YAML.load_file(yaml_filename)
  remote_branch = node['remote_branch']
  workspace_branch = node['workspace_branch']
  return WorkSpaceConfig.new(remote_branch, workspace_branch)
end
new(remote_branch, workspace_branch) click to toggle source
# File lib/config/work_space_config.rb, line 7
def initialize(remote_branch, workspace_branch)
  @remote_branch = remote_branch
  @workspace_branch = workspace_branch
end

Public Instance Methods

save(path) click to toggle source
# File lib/config/work_space_config.rb, line 19
def save(path)
  File.open(path, 'w') do |file|
    Psych.dump({'remote_branch' => @remote_branch, 'workspace_branch' => @workspace_branch}, file)
  end
end