提交 4db99eb8 编写于 作者: A Akira Matsuda

No need to nodoc private methods

上级 0fdd9bd3
......@@ -511,7 +511,7 @@ def delete_entry(key, options) # :nodoc:
private
# Merges the default options with ones specific to a method call.
def merged_options(call_options) # :nodoc:
def merged_options(call_options)
if call_options
options.merge(call_options)
else
......@@ -522,7 +522,7 @@ def merged_options(call_options) # :nodoc:
# Expands key to be a consistent string value. Invokes +cache_key+ if
# object responds to +cache_key+. Otherwise, +to_param+ method will be
# called. If the key is a Hash, then keys will be sorted alphabetically.
def expanded_key(key) # :nodoc:
def expanded_key(key)
return key.cache_key.to_s if key.respond_to?(:cache_key)
case key
......
......@@ -100,7 +100,7 @@ def delete_entry(key, options)
private
# Lock a file for a block so only one process can modify it at a time.
def lock_file(file_name, &block) # :nodoc:
def lock_file(file_name, &block)
if File.exist?(file_name)
File.open(file_name, "r+") do |f|
begin
......
......@@ -181,7 +181,7 @@ def sum(sign, time = ::Time.current) #:nodoc:
private
def method_missing(method, *args, &block) #:nodoc:
def method_missing(method, *args, &block)
value.send(method, *args, &block)
end
end
......
......@@ -358,7 +358,7 @@ def self.filename
private
def apply_mapping(string, mapping) #:nodoc:
def apply_mapping(string, mapping)
database.codepoints
string.each_codepoint.map do |codepoint|
cp = database.codepoints[codepoint]
......
......@@ -139,17 +139,17 @@ def options
@options ||= format_options.merge(opts)
end
def format_options #:nodoc:
def format_options
default_format_options.merge!(i18n_format_options)
end
def default_format_options #:nodoc:
def default_format_options
options = DEFAULTS[:format].dup
options.merge!(DEFAULTS[namespace][:format]) if namespace
options
end
def i18n_format_options #:nodoc:
def i18n_format_options
locale = opts[:locale]
options = I18n.translate(:'number.format', locale: locale, default: {}).dup
......@@ -160,7 +160,7 @@ def i18n_format_options #:nodoc:
options
end
def translate_number_value_with_default(key, i18n_options = {}) #:nodoc:
def translate_number_value_with_default(key, i18n_options = {})
I18n.translate(key, { default: default_value(key), scope: :number }.merge!(i18n_options))
end
......@@ -172,7 +172,7 @@ def default_value(key)
key.split(".").reduce(DEFAULTS) { |defaults, k| defaults[k.to_sym] }
end
def valid_float? #:nodoc:
def valid_float?
Float(number)
rescue ArgumentError, TypeError
false
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册