lib/sxp.rb in sxp-1.0.2 vs lib/sxp.rb in sxp-1.1.0
- old
+ new
@@ -30,21 +30,21 @@
# protocols.
#
# @param [String, #to_s] url
# @param [Hash{Symbol => Object}] options
# @return [Enumerable<Object>]
- def self.read_url(url, options = {})
- Reader::Basic.read_url(url, options)
+ def self.read_url(url, **options)
+ Reader::Basic.read_url(url, **options)
end
##
# Reads all S-expressions from the given input files.
#
# @overload read_files(*filenames)
# @param [Enumerable<String>] filenames
#
- # @overload read_files(*filenames, options)
+ # @overload read_files(*filenames, **options)
# @param [Enumerable<String>] filenames
# @param [Hash{Symbol => Object}] options
#
# @return [Enumerable<Object>]
def self.read_files(*filenames)
@@ -55,31 +55,31 @@
# Reads all S-expressions from a given input file.
#
# @param [String, #to_s] filename
# @param [Hash{Symbol => Object}] options
# @return [Enumerable<Object>]
- def self.read_file(filename, options = {})
- Reader::Basic.read_file(filename, options)
+ def self.read_file(filename, **options)
+ Reader::Basic.read_file(filename, **options)
end
##
# Reads all S-expressions from the given input stream.
#
# @param [IO, StringIO, String] input
# @param [Hash{Symbol => Object}] options
# @return [Enumerable<Object>]
- def self.read_all(input, options = {})
- Reader::Basic.read_all(input, options)
+ def self.read_all(input, **options)
+ Reader::Basic.read_all(input, **options)
end
##
# Reads one S-expression from the given input stream.
#
# @param [IO, StringIO, String] input
# @param [Hash{Symbol => Object}] options
# @return [Object]
- def self.read(input, options = {})
- Reader::Basic.read(input, options)
+ def self.read(input, **options)
+ Reader::Basic.read(input, **options)
end
##
# Write an internal S-Expression as a formatted SXP
#