Class: Oops::Tasks

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

Constant Summary collapse

DEFAULTS =
{
  prerequisites: ['assets:precompile'],
  additional_paths: []
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|_self| ... } ⇒ Tasks

Returns a new instance of Tasks.

Yields:

  • (_self)

Yield Parameters:

  • _self (Oops::Tasks)

    the object that the method was called on



13
14
15
16
17
18
19
# File 'lib/oops/tasks.rb', line 13

def initialize(&block)
  DEFAULTS.each do |key, value|
    public_send("#{key}=", value)
  end
  yield(self)
  create_task!
end

Instance Attribute Details

#additional_pathsObject

Returns the value of attribute additional_paths.



6
7
8
# File 'lib/oops/tasks.rb', line 6

def additional_paths
  @additional_paths
end

#prerequisitesObject

Returns the value of attribute prerequisites.



6
7
8
# File 'lib/oops/tasks.rb', line 6

def prerequisites
  @prerequisites
end