class SyntaxTree::Rake::Task

A parent Rake task that runs a command on a set of source files.

Attributes

ignore_files[RW]

Glob pattern to ignore source files. Defaults to ”.

name[RW]

Name of the task.

plugins[RW]

The set of plugins to require. Defaults to [].

print_width[RW]

Max line length. Defaults to 80.

source_files[RW]

Glob pattern to match source files. Defaults to ‘lib/*/.rb’.

target_ruby_version[RW]

The target Ruby version to use for formatting. Defaults to Gem::Version.new(RUBY_VERSION).

Public Class Methods

new( name = :"stree: { |self| ... } click to toggle source
# File lib/syntax_tree/rake/task.rb, line 36
def initialize(
  name = :"stree:#{command}",
  source_files = ::Rake::FileList["lib/**/*.rb"],
  plugins = [],
  print_width = DEFAULT_PRINT_WIDTH,
  target_ruby_version = Gem::Version.new(RUBY_VERSION),
  ignore_files = ""
)
  @name = name
  @source_files = source_files
  @plugins = plugins
  @print_width = print_width
  @target_ruby_version = target_ruby_version
  @ignore_files = ignore_files

  yield self if block_given?
  define_task
end