Class: Tooling::Task
- Extended by:
- Forwardable
- Includes:
- Rake::DSL
- Defined in:
- lib/tasks/tooling.rb
Instance Attribute Summary collapse
-
#ext_task ⇒ Object
Returns the value of attribute ext_task.
Instance Method Summary collapse
- #build_dir ⇒ Object
- #cc_json_task_name ⇒ Object
-
#initialize(ext_task, *args, **opts) {|_self| ... } ⇒ Task
constructor
A new instance of Task.
- #name ⇒ Object
- #platform_tmp_dir ⇒ Object
Constructor Details
#initialize(ext_task, *args, **opts) {|_self| ... } ⇒ Task
Returns a new instance of Task.
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/tasks/tooling.rb', line 113 def initialize(ext_task, *args, **opts) @ext_task = ext_task @_name = args.shift || ext_task.name @namespace = opts.fetch(:namespace, :tooling) @namespaced = opts.fetch(:namespaced, !@namespace.nil?) yield self if block_given? Tooling.tasks << self define(args) end |
Instance Attribute Details
#ext_task ⇒ Object
Returns the value of attribute ext_task.
111 112 113 |
# File 'lib/tasks/tooling.rb', line 111 def ext_task @ext_task end |
Instance Method Details
#build_dir ⇒ Object
136 137 138 |
# File 'lib/tasks/tooling.rb', line 136 def build_dir platform_tmp_dir.join(RUBY_VERSION.to_s) end |
#cc_json_task_name ⇒ Object
140 141 142 |
# File 'lib/tasks/tooling.rb', line 140 def cc_json_task_name task_name :pre_compile_commands end |
#name ⇒ Object
125 126 127 |
# File 'lib/tasks/tooling.rb', line 125 def name @_name ||= extname.dup end |
#platform_tmp_dir ⇒ Object
132 133 134 |
# File 'lib/tasks/tooling.rb', line 132 def platform_tmp_dir Pathname.new(File.join(ext_task.tmp_dir, ext_task.platform, ext_task.name)) end |