Rubocop: Consistent spacing

This commit is contained in:
Benjamin Fleischer
2015-08-31 04:22:59 -05:00
parent bdfe13c527
commit 228cc1c92a
47 changed files with 278 additions and 339 deletions

View File

@@ -1,7 +1,6 @@
module ActiveModel
class Serializer
class Fieldset
def initialize(fields, root = nil)
@root = root
@raw_fields = fields
@@ -16,7 +15,7 @@ module ActiveModel
fields[key.to_sym] || fields[key.pluralize.to_sym]
end
private
private
ActiveModelSerializers.silence_warnings do
attr_reader :raw_fields, :root
@@ -24,7 +23,7 @@ module ActiveModel
def parsed_fields
if raw_fields.is_a?(Hash)
raw_fields.inject({}) { |h,(k,v)| h[k.to_sym] = v.map(&:to_sym); h}
raw_fields.inject({}) { |h, (k, v)| h[k.to_sym] = v.map(&:to_sym); h }
elsif raw_fields.is_a?(Array)
if root.nil?
raise ArgumentError, 'The root argument must be specified if the fileds argument is an array.'
@@ -36,7 +35,6 @@ module ActiveModel
{}
end
end
end
end
end