lib/grape/path.rb in grape-0.6.1 vs lib/grape/path.rb in grape-0.7.0

- old
+ new

@@ -1,8 +1,7 @@ module Grape class Path - def self.prepare(raw_path, namespace, settings) Path.new(raw_path, namespace, settings).path_with_suffix end attr_reader :raw_path, :namespace, :settings @@ -20,11 +19,11 @@ def root_prefix split_setting(:root_prefix, '/') end def uses_path_versioning? - settings[:version] && settings[:version_options][:using] == :path + !!(settings[:version] && settings[:version_options][:using] == :path) end def has_namespace? namespace && namespace.to_s =~ /^\S/ && namespace != '/' end @@ -65,8 +64,7 @@ def split_setting(key, delimiter) return if settings[key].nil? settings[key].to_s.split("/") end - end end