lib/hanami/environment.rb in hanami-0.9.1 vs lib/hanami/environment.rb in hanami-0.9.2
- old
+ new
@@ -327,9 +327,19 @@
@port ||= @options.fetch(:port) do
env[HANAMI_PORT] || DEFAULT_PORT
end.to_i
end
+ # Check if the current port is the default one
+ #
+ # @since x.x.x
+ # @api private
+ #
+ # @see Hanami::ApplicationConfiguration#port
+ def default_port?
+ port == DEFAULT_PORT
+ end
+
# Path to the Rack configuration file
#
# In order to decide the value, it looks up the following sources:
#
# * CLI option `rackup`