Class: IB::RakeTask

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/ib/tasks.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|@project| ... } ⇒ RakeTask

Returns a new instance of RakeTask.

Yields:

  • (@project)


14
15
16
17
18
19
20
21
# File 'lib/ib/tasks.rb', line 14

def initialize
  require 'ib/project'
  @@created = true

  @project = IB::Project.new
  yield @project if block_given?
  define_tasks
end

Class Attribute Details

.created=(value) ⇒ Object (writeonly)

Sets the attribute created

Parameters:

  • value

    the value to set the attribute created to.



7
8
9
# File 'lib/ib/tasks.rb', line 7

def created=(value)
  @created = value
end

Class Method Details

.created?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/ib/tasks.rb', line 8

def created?
  @@created ||= false
end

Instance Method Details

#define_tasksObject



23
24
25
26
27
28
29
# File 'lib/ib/tasks.rb', line 23

def define_tasks
  namespace :ib do
    task :project do
      @project.write
    end
  end
end