Class: Poleica::Polei
- Inherits:
-
Object
- Object
- Poleica::Polei
- Includes:
- Convertible, Pathable, Typeable
- Defined in:
- lib/poleica/polei.rb
Overview
Strange name for a simple object, it represents a File
Constant Summary
Constants included from Convertible
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(path) ⇒ Polei
constructor
A new instance of Polei.
Methods included from Convertible
#compatible_convert_methods, #compatible_converters, compatible_converters_by_type, convert_methods_for_converter, #convert_to_extension, #converter_to_extension, #method_missing, methods_for_converter
Methods included from Pathable
#extension, #name, #path_for_extension, #path_with_md5, #path_without_extension
Methods included from Typeable
#file_extension, #file_mimetype, #file_type
Constructor Details
#initialize(path) ⇒ Polei
Returns a new instance of Polei.
11 12 13 14 |
# File 'lib/poleica/polei.rb', line 11 def initialize(path) @path = path.strip fail "No file @ #{path}" unless File.exist?(path) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Poleica::Convertible
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/poleica/polei.rb', line 9 def path @path end |