Module: OverrideInvoke

Defined in:
lib/rake/tilde.rb

Instance Method Summary collapse

Instance Method Details

#invoke_task(task_string) ⇒ Object



75
76
77
78
79
80
81
82
83
84
# File 'lib/rake/tilde.rb', line 75

def invoke_task(task_string)
  task_string = task_string.gsub(/^\~/, '')
  task_name, args = parse_task_string(task_string)

  if tilde_tasks.include?(task_name)
    Rake::Tilde.run(task_name, *args)
  else
    super
  end
end

#tilde?Boolean

Returns:

  • (Boolean)


90
91
92
# File 'lib/rake/tilde.rb', line 90

def tilde?
  tilde_tasks.any?
end

#tilde_tasksObject



86
87
88
# File 'lib/rake/tilde.rb', line 86

def tilde_tasks
  @__tilde_tasks ||= []
end

#top_levelObject



70
71
72
73
# File 'lib/rake/tilde.rb', line 70

def top_level
  super
  Rake::Tilde.sleep_forever if tilde?
end