Module: MotionBlender::Source::ReferringConstants
- Included in:
- MotionBlender::Source
- Defined in:
- lib/motion_blender/source/referring_constants.rb
Instance Method Summary collapse
Instance Method Details
#referring_constant? ⇒ Boolean
17 18 19 |
# File 'lib/motion_blender/source/referring_constants.rb', line 17 def referring_constant? type.const? end |
#referring_constants ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/motion_blender/source/referring_constants.rb', line 4 def referring_constants @referring_constants ||= begin child_constants = children.map(&:referring_constants).inject(&:+).to_a if referring_constant? child_constants + [[wrapping_modules.map(&:last), code]] else child_constants.dup end end end |