Class: OsCtld::Config::Mbuffer
- Inherits:
-
Object
- Object
- OsCtld::Config::Mbuffer
- Defined in:
- lib/osctld/config.rb
Instance Attribute Summary collapse
- #as_cli_options ⇒ Array<String> readonly
- #as_hash_options ⇒ Hash readonly
- #block_size ⇒ String readonly
- #buffer_size ⇒ String readonly
- #start_writing_at ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(cfg) ⇒ Mbuffer
constructor
A new instance of Mbuffer.
Constructor Details
#initialize(cfg) ⇒ Mbuffer
Returns a new instance of Mbuffer.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/osctld/config.rb', line 89 def initialize(cfg) @block_size = cfg.fetch('block_size', '128k') @buffer_size = cfg.fetch('buffer_size', '256M') @start_writing_at = cfg.fetch('start_writing_at', 80) @as_cli_options = [ '-s', block_size, '-m', buffer_size, '-P', start_writing_at.to_s ] @as_hash_options = { block_size:, buffer_size:, start_writing_at: } end |
Instance Attribute Details
#as_cli_options ⇒ Array<String> (readonly)
84 85 86 |
# File 'lib/osctld/config.rb', line 84 def @as_cli_options end |
#as_hash_options ⇒ Hash (readonly)
87 88 89 |
# File 'lib/osctld/config.rb', line 87 def @as_hash_options end |
#block_size ⇒ String (readonly)
75 76 77 |
# File 'lib/osctld/config.rb', line 75 def block_size @block_size end |
#buffer_size ⇒ String (readonly)
78 79 80 |
# File 'lib/osctld/config.rb', line 78 def buffer_size @buffer_size end |
#start_writing_at ⇒ Integer (readonly)
81 82 83 |
# File 'lib/osctld/config.rb', line 81 def start_writing_at @start_writing_at end |