Class: Webtask::TaskWrapper
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Webtask::TaskWrapper
- Defined in:
- lib/webtask/task_wrapper.rb
Instance Method Summary collapse
Instance Method Details
#has_options_for?(arg_name) ⇒ Boolean
3 4 5 |
# File 'lib/webtask/task_wrapper.rb', line 3 def (arg_name) !![arg_name.to_sym] end |
#options ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/webtask/task_wrapper.rb', line 11 def arg_names.each_with_object({}) do |arg_name, | if __getobj__.respond_to?(:options_for, true) if = __getobj__.send(:options_for, arg_name) [arg_name.to_sym] = else next end else next end end end |
#shell_command(args:) ⇒ Object
7 8 9 |
# File 'lib/webtask/task_wrapper.rb', line 7 def shell_command(args:) "bundle exec rake #{name}[#{args.join(",")}]" end |