class Cxxproject::CustomBuildingBlock

Attributes

actions[R]
custom_command[R]

Public Instance Methods

convert_to_rake() click to toggle source
# File lib/cxxproject/buildingblocks/custom_building_block.rb, line 26
def convert_to_rake()
  desc get_task_name
  res = task get_task_name do
    actions.each do |a|
      a.call
    end
  end
  res.type = Rake::Task::CUSTOM
  setup_rake_dependencies(res)
  res
end
get_task_name() click to toggle source
# File lib/cxxproject/buildingblocks/custom_building_block.rb, line 14
def get_task_name()
  name
end
set_actions(actions) click to toggle source
# File lib/cxxproject/buildingblocks/custom_building_block.rb, line 18
def set_actions(actions)
  if actions.kind_of?(Array)
    @actions = actions
  else
    @actions = [actions]
  end
end
set_custom_command(c) click to toggle source
# File lib/cxxproject/buildingblocks/custom_building_block.rb, line 9
def set_custom_command(c)
  @custom_command = c
  self
end