Module: RubyLeiningen::Commands::Helpers::Bikeshed
- Defined in:
- lib/ruby_leiningen/commands/plugins/bikeshed.rb
Class Method Summary collapse
- .with_docstrings(command, docstrings) ⇒ Object
- .with_exclude_profiles(command, exclude_profiles) ⇒ Object
- .with_long_lines(command, long_lines) ⇒ Object
- .with_maximum_line_length(command, maximum_line_length) ⇒ Object
- .with_name_collisions(command, name_collisions) ⇒ Object
- .with_show_help(command, show_help) ⇒ Object
- .with_trailing_blank_lines(command, trailing_blank_lines) ⇒ Object
- .with_trailing_whitespace(command, trailing_whitespace) ⇒ Object
- .with_var_redefs(command, var_redefs) ⇒ Object
- .with_verbose(command, verbose) ⇒ Object
Class Method Details
.with_docstrings(command, docstrings) ⇒ Object
52 53 54 55 56 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 52 def with_docstrings(command, docstrings) return command if docstrings.nil? command.with_option('--docstrings', docstrings) end |
.with_exclude_profiles(command, exclude_profiles) ⇒ Object
64 65 66 67 68 69 70 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 64 def with_exclude_profiles(command, exclude_profiles) return command if exclude_profiles.nil? command.with_option( '--exclude-profiles', exclude_profiles.join(',') ) end |
.with_long_lines(command, long_lines) ⇒ Object
28 29 30 31 32 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 28 def with_long_lines(command, long_lines) return command if long_lines.nil? command.with_option('--long-lines', long_lines) end |
.with_maximum_line_length(command, maximum_line_length) ⇒ Object
22 23 24 25 26 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 22 def with_maximum_line_length(command, maximum_line_length) return command unless maximum_line_length command.with_option('--max-line-length', maximum_line_length) end |
.with_name_collisions(command, name_collisions) ⇒ Object
58 59 60 61 62 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 58 def with_name_collisions(command, name_collisions) return command if name_collisions.nil? command.with_option('--name-collisions', name_collisions) end |
.with_show_help(command, show_help) ⇒ Object
10 11 12 13 14 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 10 def with_show_help(command, show_help) return command if show_help.nil? command.with_flag(show_help ? '--help-me' : '--no-help-me') end |
.with_trailing_blank_lines(command, trailing_blank_lines) ⇒ Object
40 41 42 43 44 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 40 def with_trailing_blank_lines(command, trailing_blank_lines) return command if trailing_blank_lines.nil? command.with_option('--trailing-blank-lines', trailing_blank_lines) end |
.with_trailing_whitespace(command, trailing_whitespace) ⇒ Object
34 35 36 37 38 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 34 def with_trailing_whitespace(command, trailing_whitespace) return command if trailing_whitespace.nil? command.with_option('--trailing-whitespace', trailing_whitespace) end |
.with_var_redefs(command, var_redefs) ⇒ Object
46 47 48 49 50 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 46 def with_var_redefs(command, var_redefs) return command if var_redefs.nil? command.with_option('--var-redefs', var_redefs) end |
.with_verbose(command, verbose) ⇒ Object
16 17 18 19 20 |
# File 'lib/ruby_leiningen/commands/plugins/bikeshed.rb', line 16 def with_verbose(command, verbose) return command if verbose.nil? command.with_flag(verbose ? '--verbose' : '--no-verbose') end |