Module: MotionBlender::Ext::Raketime

Included in:
MotionBlender
Defined in:
lib/motion_blender/ext/raketime.rb

Instance Method Summary collapse

Instance Method Details

#except(file = nil) ⇒ Object



11
12
13
14
# File 'lib/motion_blender/ext/raketime.rb', line 11

def except file = nil
  file ||= caller.first.split(':', 2).first
  config.excepted_files << file
end

#incept(file = nil) ⇒ Object



6
7
8
9
# File 'lib/motion_blender/ext/raketime.rb', line 6

def incept file = nil
  file ||= caller.first.split(':', 2).first
  config.incepted_files << file
end

#motion?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/motion_blender/ext/raketime.rb', line 33

def motion?
  !!(defined?(Motion) && defined?(Motion::Project))
end

#raketimeObject



45
46
47
# File 'lib/motion_blender/ext/raketime.rb', line 45

def raketime
  yield if motion?
end

#raketime?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/motion_blender/ext/raketime.rb', line 37

def raketime?
  true
end

#runtimeObject



49
50
# File 'lib/motion_blender/ext/raketime.rb', line 49

def runtime
end

#runtime?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/motion_blender/ext/raketime.rb', line 41

def runtime?
  false
end

#use_motion_dir(dir = nil) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/motion_blender/ext/raketime.rb', line 16

def use_motion_dir dir = nil
  return unless motion?

  unless dir
    file = caller.first.split(':', 2).first
    Pathname.new(file).dirname.ascend do |path|
      if $LOAD_PATH.include?(path.to_s)
        dir = path.dirname.join('motion').to_s
        break
      end
    end
  end
  unless config.motion_dirs.include? dir
    config.motion_dirs << dir
  end
end