Class: MotionBlender::Interpreters::RequireRelativeInterpreter
- Inherits:
-
RequireInterpreter
- Object
- Base
- RequireInterpreter
- MotionBlender::Interpreters::RequireRelativeInterpreter
- Defined in:
- lib/motion_blender/interpreters/require_relative_interpreter.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from RequireInterpreter
Methods included from Requirable
Methods inherited from Base
#initialize, interprets, key, requirable?
Constructor Details
This class inherits a constructor from MotionBlender::Interpreters::Base
Instance Method Details
#candidates(arg) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/motion_blender/interpreters/require_relative_interpreter.rb', line 8 def candidates arg path = Pathname.new(file).dirname.join(arg) exts = path.extname.empty? ? ['', '.rb'] : [''] Enumerator.new do |y| exts.each do |ext| y << Pathname.new("#{path}#{ext}") end end end |