class Gb::WorkSpaceConfig
Attributes
remote_branch[R]
work_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'] work_branch = node['work_branch'] return WorkSpaceConfig.new(remote_branch, work_branch) end
new(remote_branch, work_branch)
click to toggle source
# File lib/config/work_space_config.rb, line 7 def initialize(remote_branch, work_branch) @remote_branch = remote_branch @work_branch = work_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, 'work_branch' => @work_branch}, file) end end