diff --git a/lib/yard/core_ext/module.rb b/lib/yard/core_ext/module.rb index 6f0b95105..93fef9d9a 100644 --- a/lib/yard/core_ext/module.rb +++ b/lib/yard/core_ext/module.rb @@ -8,13 +8,4 @@ class Module def class_name name.split("::").last end - - # Returns the module namespace path minus the class/module name - # - # @example - # module A::B::C; namespace_name end # => "A::B" - # @return [String] the namespace minus the class/module name - def namespace_name - name.split("::")[0..-2].join("::") - end end diff --git a/po/ja.po b/po/ja.po index 9e45fd661..199fb1486 100644 --- a/po/ja.po +++ b/po/ja.po @@ -15043,16 +15043,6 @@ msgstr "" msgid "the last part of a module path" msgstr "モジュールパスの最後の部分" -# Module#namespace_name -#: ../lib/yard/core_ext/module.rb:12 -msgid "Returns the module namespace path minus the class/module name" -msgstr "クラス/モジュール名を引いたモジュールのnamespaceのパスを返す" - -# @example -#: ../lib/yard/core_ext/module.rb:16 -msgid "module A::B::C; namespace_name end # => \"A::B\"" -msgstr "" - # @return [String] #: ../lib/yard/core_ext/module.rb:16 msgid "the namespace minus the class/module name" diff --git a/spec/core_ext/module_spec.rb b/spec/core_ext/module_spec.rb index f7de3c769..a9d49bcea 100644 --- a/spec/core_ext/module_spec.rb +++ b/spec/core_ext/module_spec.rb @@ -6,10 +6,4 @@ expect(YARD::CodeObjects::Base.class_name).to eq "Base" end end - - describe "#namespace" do - it "returns everything before the class name" do - expect(YARD::CodeObjects::Base.namespace_name).to eq "YARD::CodeObjects" - end - end end