Class: IRB::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/irb/rake_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) {|_self| ... } ⇒ RakeTask

Returns a new instance of RakeTask.

Yields:

  • (_self)

Yield Parameters:

  • _self (IRB::RakeTask)

    the object that the method was called on



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/irb/rake_task.rb', line 15

def initialize(*args)
  @name = args.shift || :console

  yield self if block_given?

  desc("Start the console") unless ::Rake.application.last_comment

  task name do
    ARGV.clear
    IRB.start
  end
end

Instance Attribute Details

#nameObject

Name of task.

default:

:spec


13
14
15
# File 'lib/irb/rake_task.rb', line 13

def name
  @name
end