Class: Mediakit::Drivers::AbstractFactory
- Inherits:
-
Object
- Object
- Mediakit::Drivers::AbstractFactory
- Defined in:
- lib/mediakit/drivers.rb
Class Attribute Summary collapse
-
.bin_path ⇒ Object
Returns the value of attribute bin_path.
Class Method Summary collapse
Class Attribute Details
.bin_path ⇒ Object
Returns the value of attribute bin_path.
92 93 94 |
# File 'lib/mediakit/drivers.rb', line 92 def bin_path @bin_path end |
Class Method Details
.bin ⇒ Object
102 103 104 |
# File 'lib/mediakit/drivers.rb', line 102 def bin bin_path || name end |
.configure {|_self| ... } ⇒ Object
94 95 96 |
# File 'lib/mediakit/drivers.rb', line 94 def configure(&block) yield(self) end |
.name ⇒ Object
98 99 100 |
# File 'lib/mediakit/drivers.rb', line 98 def name self.to_s.downcase.split('::').last end |
.new(type = :popen) ⇒ Object
106 107 108 109 110 111 112 113 114 115 |
# File 'lib/mediakit/drivers.rb', line 106 def new(type = :popen) case type.to_sym when :popen PopenDriver.new(bin) when :fake FakeDriver.new(bin) else raise(ArgumentError) end end |