Class: RgGen::InputBase::Loader
- Inherits:
-
Object
- Object
- RgGen::InputBase::Loader
- Defined in:
- lib/rggen/input_base/loader.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.supported_types ⇒ Object
writeonly
Sets the attribute supported_types.
Class Method Summary collapse
Instance Method Summary collapse
Class Attribute Details
.supported_types=(value) ⇒ Object (writeonly)
Sets the attribute supported_types
5 6 7 |
# File 'lib/rggen/input_base/loader.rb', line 5 def supported_types=(value) @supported_types = value end |
Class Method Details
.acceptable?(file) ⇒ Boolean
7 8 9 10 |
# File 'lib/rggen/input_base/loader.rb', line 7 def acceptable?(file) ext = File.ext(file).to_sym @supported_types.any? { |type| type.casecmp(ext).zero? } end |
.load(file) ⇒ Object
12 13 14 |
# File 'lib/rggen/input_base/loader.rb', line 12 def load(file) new.load(file) end |