Class: OsCtld::Config
- Inherits:
-
Object
show all
- Defined in:
- lib/osctld/config.rb
Overview
osctld config file interface
Defined Under Namespace
Classes: CpuPackage, CpuScheduler, Mbuffer, SendReceive, TrashBin
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(path) ⇒ Config
Returns a new instance of Config.
144
145
146
147
148
149
150
151
152
153
154
155
|
# File 'lib/osctld/config.rb', line 144
def initialize(path)
cfg = JSON.parse(File.read(path))
@debug = cfg.fetch('debug', false)
@apparmor_paths = cfg.fetch('apparmor_paths', [])
@enable_time_namespace = cfg.fetch('enable_time_namespace', true)
@ctstartmenu = cfg['ctstartmenu']
@enable_lock_registry = cfg.fetch('lock_registry', false)
@cpu_scheduler = CpuScheduler.new(cfg.fetch('cpu_scheduler', {}))
@send_receive = SendReceive.new(cfg.fetch('send_receive', {}))
@trash_bin = TrashBin.new(cfg.fetch('trash_bin', {}))
end
|
Instance Attribute Details
#apparmor_paths ⇒ Array<String>
121
122
123
|
# File 'lib/osctld/config.rb', line 121
def apparmor_paths
@apparmor_paths
end
|
135
136
137
|
# File 'lib/osctld/config.rb', line 135
def cpu_scheduler
@cpu_scheduler
end
|
128
129
130
|
# File 'lib/osctld/config.rb', line 128
def
@ctstartmenu
end
|
#debug ⇒ Boolean
Also known as:
debug?
117
118
119
|
# File 'lib/osctld/config.rb', line 117
def debug
@debug
end
|
#enable_lock_registry ⇒ Boolean
Also known as:
enable_lock_registry?
131
132
133
|
# File 'lib/osctld/config.rb', line 131
def enable_lock_registry
@enable_lock_registry
end
|
#enable_time_namespace ⇒ Boolean
Also known as:
enable_time_namespace?
124
125
126
|
# File 'lib/osctld/config.rb', line 124
def enable_time_namespace
@enable_time_namespace
end
|
138
139
140
|
# File 'lib/osctld/config.rb', line 138
def send_receive
@send_receive
end
|
141
142
143
|
# File 'lib/osctld/config.rb', line 141
def trash_bin
@trash_bin
end
|