aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/formatter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/formatter.rb')
-rw-r--r--actionpack/lib/action_dispatch/journey/formatter.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/journey/formatter.rb b/actionpack/lib/action_dispatch/journey/formatter.rb
index 873a73baf0..106b9c33c3 100644
--- a/actionpack/lib/action_dispatch/journey/formatter.rb
+++ b/actionpack/lib/action_dispatch/journey/formatter.rb
@@ -1,9 +1,8 @@
module ActionDispatch
module Journey
- ###
- # The Formatter class is used for formatting URLs. For example, parameters
- # passed to +url_for+ in rails will eventually call Formatter#generate
- class Formatter
+ # The Formatter class is used for formatting URLs. For example, parameters
+ # passed to +url_for+ in rails will eventually call Formatter#generate.
+ class Formatter # :nodoc:
attr_reader :routes
def initialize routes
@@ -101,7 +100,7 @@ module ActionDispatch
routes
end
- # returns an array populated with missing keys if any are present
+ # Returns an array populated with missing keys if any are present.
def missing_keys route, parts
missing_keys = []
tests = route.path.requirements
@@ -123,7 +122,7 @@ module ActionDispatch
}.flatten(1)
end
- # returns boolean, true if no missing keys are present
+ # Returns +true+ if no missing keys are present, otherwise +false+.
def verify_required_parts! route, parts
missing_keys(route, parts).empty?
end