Module: Output::Devices
- Defined in:
- lib/output/devices.rb
Defined Under Namespace
Modules: Builder, OptionValidation
Class Method Summary collapse
Class Method Details
.build_device(type, options = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/output/devices.rb', line 3 def self.build_device(type, = {}) builders = { :stdout => Builder::Stdout, :string_io => Builder::StringIo, :file => Builder::File, :stderr => Builder::Stderr } = { :name => type, :pattern => DEFAULT_PATTERN } = .merge() name = [:name] builder = builders[type] builder.build(name, ) end |