Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

Commit

Permalink
Remove RubyLint::ConstantPath#root_node
Browse files Browse the repository at this point in the history
It is no longer used since 971a7da
  • Loading branch information
mvidner committed Jun 28, 2016
1 parent 19c2ec5 commit 6b8d972
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
9 changes: 0 additions & 9 deletions lib/ruby-lint/constant_path.rb
Expand Up @@ -55,15 +55,6 @@ def resolve(scope)
return current
end

##
# Returns the very first segment of the constant path as an AST node.
#
# @return [RubyLint::AST::Node]
#
def root_node
return constant_segments.first
end

##
# Returns a String containing the full constant path, e.g.
# "RubyLint::Runner".
Expand Down
7 changes: 0 additions & 7 deletions spec/ruby-lint/constant_path_spec.rb
@@ -1,13 +1,6 @@
require 'spec_helper'

describe RubyLint::ConstantPath do
example 'return the root node of a constant path' do
node = s(:const, s(:const, nil, :Foo), :Bar)
root = RubyLint::ConstantPath.new(node).root_node

root.should == [:const, 'Foo']
end

example 'generate the name of a constant path' do
node = s(:const, s(:const, nil, :Foo), :Bar)
name = RubyLint::ConstantPath.new(node).to_s
Expand Down

0 comments on commit 6b8d972

Please sign in to comment.