aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/xml_mini.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 17:58:50 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 18:10:53 +0200
commitd66e7835bea9505f7003e5038aa19b6ea95ceea1 (patch)
tree9846f86c6d130595f54c389c83b66d57101563c5 /activesupport/lib/active_support/xml_mini.rb
parent77eb40dab64e1fe2a759044d4f122dc0ef833141 (diff)
downloadrails-d66e7835bea9505f7003e5038aa19b6ea95ceea1.tar.gz
rails-d66e7835bea9505f7003e5038aa19b6ea95ceea1.tar.bz2
rails-d66e7835bea9505f7003e5038aa19b6ea95ceea1.zip
applies new string literal convention in activesupport/lib
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
Diffstat (limited to 'activesupport/lib/active_support/xml_mini.rb')
-rw-r--r--activesupport/lib/active_support/xml_mini.rb26
1 files changed, 13 insertions, 13 deletions
diff --git a/activesupport/lib/active_support/xml_mini.rb b/activesupport/lib/active_support/xml_mini.rb
index 99fc26549e..c6459ab0ee 100644
--- a/activesupport/lib/active_support/xml_mini.rb
+++ b/activesupport/lib/active_support/xml_mini.rb
@@ -1,9 +1,9 @@
-require 'time'
-require 'base64'
-require 'bigdecimal'
-require 'active_support/core_ext/module/delegation'
-require 'active_support/core_ext/string/inflections'
-require 'active_support/core_ext/date_time/calculations'
+require "time"
+require "base64"
+require "bigdecimal"
+require "active_support/core_ext/module/delegation"
+require "active_support/core_ext/string/inflections"
+require "active_support/core_ext/date_time/calculations"
module ActiveSupport
# = XmlMini
@@ -20,11 +20,11 @@ module ActiveSupport
attr_writer :original_filename, :content_type
def original_filename
- @original_filename || 'untitled'
+ @original_filename || "untitled"
end
def content_type
- @content_type || 'application/octet-stream'
+ @content_type || "application/octet-stream"
end
end
@@ -159,8 +159,8 @@ module ActiveSupport
# TODO: Add support for other encodings
def _parse_binary(bin, entity) #:nodoc:
- case entity['encoding']
- when 'base64'
+ case entity["encoding"]
+ when "base64"
::Base64.decode64(bin)
else
bin
@@ -170,8 +170,8 @@ module ActiveSupport
def _parse_file(file, entity)
f = StringIO.new(::Base64.decode64(file))
f.extend(FileLike)
- f.original_filename = entity['name']
- f.content_type = entity['content_type']
+ f.original_filename = entity["name"]
+ f.content_type = entity["content_type"]
f
end
@@ -195,5 +195,5 @@ module ActiveSupport
end
end
- XmlMini.backend = 'REXML'
+ XmlMini.backend = "REXML"
end