class Binpkgbot::Config
Public Class Methods
from_yaml(yaml)
click to toggle source
# File lib/binpkgbot/config.rb, line 7 def self.from_yaml(yaml) new(YAML.load(yaml)) end
load_yaml(path)
click to toggle source
# File lib/binpkgbot/config.rb, line 11 def self.load_yaml(path) new(YAML.load_file(path)) end
new(doc={})
click to toggle source
# File lib/binpkgbot/config.rb, line 15 def initialize(doc={}) @doc = Utils.symbolize_keys(doc) end
Public Instance Methods
binds()
click to toggle source
# File lib/binpkgbot/config.rb, line 35 def binds @doc[:binds] end
config_protect_mask()
click to toggle source
# File lib/binpkgbot/config.rb, line 49 def config_protect_mask @doc[:config_protect_mask] end
config_protect_mask?()
click to toggle source
# File lib/binpkgbot/config.rb, line 45 def config_protect_mask? @doc.key?(:config_protect_mask) end
emerge_options()
click to toggle source
# File lib/binpkgbot/config.rb, line 31 def emerge_options @doc[:emerge_options] end
etc_portage()
click to toggle source
# File lib/binpkgbot/config.rb, line 23 def etc_portage @doc[:etc_portage] end
portage_repo()
click to toggle source
# File lib/binpkgbot/config.rb, line 27 def portage_repo @doc[:portage_repo] end
stage()
click to toggle source
# File lib/binpkgbot/config.rb, line 19 def stage @doc[:stage] end
tasks()
click to toggle source
# File lib/binpkgbot/config.rb, line 39 def tasks (@doc[:tasks] || []).map do |defi| Tasks.from_definition(defi, config: self) end end
use_sudo_for_nspawn?()
click to toggle source
# File lib/binpkgbot/config.rb, line 53 def use_sudo_for_nspawn? @doc.fetch(:use_sudo_for_nspawn, false) end