Skip to content

Commit

Permalink
Merge pull request #1229 from dduugg/dug-rm-namespace_name
Browse files Browse the repository at this point in the history
Remove Module#namespace extension
  • Loading branch information
lsegal committed Mar 31, 2019
2 parents 7579761 + 886a51f commit 87ef6d8
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 25 deletions.
9 changes: 0 additions & 9 deletions lib/yard/core_ext/module.rb
Expand Up @@ -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
10 changes: 0 additions & 10 deletions po/ja.po
Expand Up @@ -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"
Expand Down
6 changes: 0 additions & 6 deletions spec/core_ext/module_spec.rb
Expand Up @@ -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

0 comments on commit 87ef6d8

Please sign in to comment.