Class: AudioSwitch::Pactl::ModuleOptions
- Inherits:
-
Object
- Object
- AudioSwitch::Pactl::ModuleOptions
- Defined in:
- lib/audio_switch/pactl.rb
Instance Method Summary collapse
- #format(opts, quote = '') ⇒ Object
-
#initialize(options) ⇒ ModuleOptions
constructor
A new instance of ModuleOptions.
- #to_s ⇒ Object
Constructor Details
#initialize(options) ⇒ ModuleOptions
Returns a new instance of ModuleOptions.
166 167 168 |
# File 'lib/audio_switch/pactl.rb', line 166 def initialize() @options = end |
Instance Method Details
#format(opts, quote = '') ⇒ Object
174 175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/audio_switch/pactl.rb', line 174 def format(opts, quote = '') result = '' opts.each_pair do |key, value| result += ' ' unless result.empty? result += if value.is_a? Hash "#{key}=\\\"#{format(value, '\\\'')}\\\"" else "#{key}=#{quote}#{value}#{quote}" end end result end |
#to_s ⇒ Object
170 171 172 |
# File 'lib/audio_switch/pactl.rb', line 170 def to_s format(@options) end |