Class: Rubomop::Mop::DeleteOption
- Inherits:
-
Struct
- Object
- Struct
- Rubomop::Mop::DeleteOption
- Defined in:
- lib/rubomop/mop.rb
Instance Attribute Summary collapse
-
#cop ⇒ Object
Returns the value of attribute cop.
-
#file ⇒ Object
Returns the value of attribute file.
-
#run_rubocop ⇒ Object
Returns the value of attribute run_rubocop.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Instance Method Summary collapse
Instance Attribute Details
#cop ⇒ Object
Returns the value of attribute cop
69 70 71 |
# File 'lib/rubomop/mop.rb', line 69 def cop @cop end |
#file ⇒ Object
Returns the value of attribute file
69 70 71 |
# File 'lib/rubomop/mop.rb', line 69 def file @file end |
#run_rubocop ⇒ Object
Returns the value of attribute run_rubocop
69 70 71 |
# File 'lib/rubomop/mop.rb', line 69 def run_rubocop @run_rubocop end |
#verbose ⇒ Object
Returns the value of attribute verbose
69 70 71 |
# File 'lib/rubomop/mop.rb', line 69 def verbose @verbose end |
Instance Method Details
#delete! ⇒ Object
75 76 77 |
# File 'lib/rubomop/mop.rb', line 75 def delete! cop.delete!(file) end |
#print_message ⇒ Object
70 71 72 73 |
# File 'lib/rubomop/mop.rb', line 70 def return unless verbose print "Deleting #{file} from #{cop.name}" if verbose end |
#rubocop_runner ⇒ Object
79 80 81 82 83 |
# File 'lib/rubomop/mop.rb', line 79 def rubocop_runner return unless run_rubocop print "\nbundle exec rubocop #{file} -aD\n" system("bundle exec rubocop #{file} -aD") end |