Class: MotionBlender::Interpreters::OriginalInterpreter
- Defined in:
- lib/motion_blender/interpreters/original_interpreter.rb
Instance Attribute Summary collapse
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, interprets, key, requirable?
Constructor Details
This class inherits a constructor from MotionBlender::Interpreters::Base
Instance Attribute Details
#original ⇒ Object (readonly)
Returns the value of attribute original.
8 9 10 |
# File 'lib/motion_blender/interpreters/original_interpreter.rb', line 8 def original @original end |
Instance Method Details
#interpret ⇒ Object
10 11 12 13 14 15 |
# File 'lib/motion_blender/interpreters/original_interpreter.rb', line 10 def interpret dir = MotionBlender.config.motion_dirs.find { |d| file.start_with? d } raise 'not found in motion_dirs' unless dir arg = Pathname.new(file).relative_path_from(Pathname.new(dir)) @original = candidates_for(arg).find(&:file?).try(&:to_s) end |