提交 b1b9a0ae 编写于 作者: L Lauro Caetano

Typos. return -> returns. [ci skip]

上级 41ba51f4
......@@ -45,7 +45,7 @@ def render_to_string(*args, &block)
def render_to_body(options = {})
end
# Return Content-Type of rendered content
# Returns Content-Type of rendered content
# :api: public
def rendered_format
Mime::TEXT
......
module ActionController
module Head
# Return a response that has no content (merely headers). The options
# Returns a response that has no content (merely headers). The options
# argument is interpreted to be a hash of header names and values.
# This allows you to easily return a response that consists only of
# significant headers:
......
......@@ -242,7 +242,7 @@ def https!(flag = true)
@https = flag
end
# Return +true+ if the session is mimicking a secure HTTPS request.
# Returns +true+ if the session is mimicking a secure HTTPS request.
#
# if session.https?
# ...
......
......@@ -21,7 +21,7 @@ def display
def authenticate
authenticate_or_request_with_http_digest("SuperSecret") do |username|
# Return the password
# Returns the password
USERS[username]
end
end
......
......@@ -71,12 +71,12 @@ def initialize(parent, line=0, pos=0)
@line, @position = line, pos
end
# Return a textual representation of the node.
# Returns a textual representation of the node.
def to_s
@children.join()
end
# Return false (subclasses must override this to provide specific matching
# Returns false (subclasses must override this to provide specific matching
# behavior.) +conditions+ may be of any type.
def match(conditions)
false
......
......@@ -488,7 +488,7 @@ def to_s #:nodoc:
end
# Return the next element after this one. Skips sibling text nodes.
# Returns the next element after this one. Skips sibling text nodes.
#
# With the +name+ argument, returns the next element with that name,
# skipping other sibling elements.
......
......@@ -30,7 +30,7 @@ def initialize(text)
@current_line = 1
end
# Return the next token in the sequence, or +nil+ if there are no more tokens in
# Returns the next token in the sequence, or +nil+ if there are no more tokens in
# the stream.
def next
return nil if @scanner.eos?
......
......@@ -109,7 +109,7 @@ def initialize(options = {})
deprecated_setup(options)
end
# Return the kind for this validator.
# Returns the kind for this validator.
#
# PresenceValidator.new.kind # => :presence
# UniquenessValidator.new.kind # => :uniqueness
......
......@@ -86,7 +86,7 @@ def any_waiting?
end
end
# Return the number of threads currently waiting on this
# Returns the number of threads currently waiting on this
# queue.
def num_waiting
synchronize do
......
......@@ -350,7 +350,7 @@ def join_to_delete(delete, select, key) #:nodoc:
protected
# Return a subquery for the given key using the join information.
# Returns a subquery for the given key using the join information.
def subquery_for(key, select)
subselect = select.clone
subselect.projections = [key]
......
......@@ -582,7 +582,7 @@ def fixture_sql(conn)
}
end
# Return a hash of rows to be inserted. The key is the table, the value is
# Returns a hash of rows to be inserted. The key is the table, the value is
# a list of rows to insert to that table.
def table_rows
now = config.default_timezone == :utc ? Time.now.utc : Time.now
......
......@@ -401,7 +401,7 @@ def delete(name, options = nil)
end
end
# Return +true+ if the cache contains an entry for the given key.
# Returns +true+ if the cache contains an entry for the given key.
#
# Options are passed to the underlying cache implementation.
def exist?(name, options = nil)
......
class Hash
# Return a hash that includes everything but the given keys. This is useful for
# Returns a hash that includes everything but the given keys. This is useful for
# limiting a set of parameters to everything but a few known toggles:
#
# @person.update(params[:person].except(:admin))
......
class Hash
# Return a new hash with all keys converted using the block operation.
# Returns a new hash with all keys converted using the block operation.
#
# hash = { name: 'Rob', age: '28' }
#
......@@ -22,7 +22,7 @@ def transform_keys!
self
end
# Return a new hash with all keys converted to strings.
# Returns a new hash with all keys converted to strings.
#
# hash = { name: 'Rob', age: '28' }
#
......@@ -38,7 +38,7 @@ def stringify_keys!
transform_keys!{ |key| key.to_s }
end
# Return a new hash with all keys converted to symbols, as long as
# Returns a new hash with all keys converted to symbols, as long as
# they respond to +to_sym+.
#
# hash = { 'name' => 'Rob', 'age' => '28' }
......@@ -71,7 +71,7 @@ def assert_valid_keys(*valid_keys)
end
end
# Return a new hash with all keys converted by the block operation.
# Returns a new hash with all keys converted by the block operation.
# This includes the keys from the root hash and from all
# nested hashes.
#
......@@ -98,7 +98,7 @@ def deep_transform_keys!(&block)
self
end
# Return a new hash with all keys converted to strings.
# Returns a new hash with all keys converted to strings.
# This includes the keys from the root hash and from all
# nested hashes.
#
......@@ -117,7 +117,7 @@ def deep_stringify_keys!
deep_transform_keys!{ |key| key.to_s }
end
# Return a new hash with all keys converted to symbols, as long as
# Returns a new hash with all keys converted to symbols, as long as
# they respond to +to_sym+. This includes the keys from the root hash
# and from all nested hashes.
#
......
......@@ -346,14 +346,14 @@ def self.find_tzinfo(name)
class << self
alias_method :create, :new
# Return a TimeZone instance with the given name, or +nil+ if no
# Returns a TimeZone instance with the given name, or +nil+ if no
# such TimeZone instance exists. (This exists to support the use of
# this class with the +composed_of+ macro.)
def new(name)
self[name]
end
# Return an array of all TimeZone objects. There are multiple
# Returns an array of all TimeZone objects. There are multiple
# TimeZone objects per time zone, in many cases, to make it easier
# for users to find their own time zone.
def all
......
......@@ -296,7 +296,7 @@ def self.generator_name
end
end
# Return the default value for the option name given doing a lookup in
# Returns the default value for the option name given doing a lookup in
# Rails::Generators.options.
def self.default_value_for_option(name, options)
default_for_option(Rails::Generators.options, name, options, options[:default])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册