Class: Poleica::Converters::General
- Inherits:
-
Object
- Object
- Poleica::Converters::General
- Defined in:
- lib/poleica/converters/general.rb
Overview
The General converter, it handles any file type and return null for unknown conversion
Constant Summary collapse
Instance Attribute Summary collapse
-
#polei ⇒ Object
readonly
Returns the value of attribute polei.
Instance Method Summary collapse
-
#initialize(polei) ⇒ General
constructor
A new instance of General.
- #method_missing(method, *args, &block) ⇒ Object
- #to_bin(_options = {}) ⇒ Object
Constructor Details
#initialize(polei) ⇒ General
Returns a new instance of General.
13 14 15 |
# File 'lib/poleica/converters/general.rb', line 13 def initialize(polei) @polei = polei end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
21 22 23 |
# File 'lib/poleica/converters/general.rb', line 21 def method_missing(method, *args, &block) super unless method =~ /^to_/ end |
Instance Attribute Details
#polei ⇒ Object (readonly)
Returns the value of attribute polei.
11 12 13 |
# File 'lib/poleica/converters/general.rb', line 11 def polei @polei end |
Instance Method Details
#to_bin(_options = {}) ⇒ Object
17 18 19 |
# File 'lib/poleica/converters/general.rb', line 17 def to_bin( = {}) File.binread(polei.path) end |