File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -666,6 +666,13 @@ Style/NumericLiterals:
666666Style/ObjectThen :
667667 Enabled : true
668668
669+ # Extensions to other Ruby libraries purposefully declare
670+ # multiple classes.
671+ Style/OneClassPerFile :
672+ Exclude :
673+ - lib/git/*
674+ - lib/vanagon/extensions/**/*
675+
669676Style/OneLineConditional :
670677 Enabled : true
671678
Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ def component_rule
225225 # Generate a Makefile fragment that contains all of the rules for the component.
226226 # @return [String]
227227 def format
228- rules . map ( & :to_s ) . join ( "\n " )
228+ rules . join ( "\n " )
229229 end
230230
231231 alias to_s format
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ module HashableAttributes
77 # @return [Hash] Converts an object to a hash with keys representing
88 # each attribute (as symbols) and their corresponding values
99 def to_hash
10- instance_variables . each_with_object ( { } ) do |var , hash |
11- hash [ var . to_s . delete ( "@" ) ] = instance_variable_get ( var )
10+ instance_variables . to_h do |var |
11+ [ var . to_s . delete ( "@" ) , instance_variable_get ( var ) ]
1212 end
1313 end
1414 alias_method :to_h , :to_hash
You can’t perform that action at this time.
0 commit comments